[CF-Devel] Inventory bug SC_VERSINO 1024

Michael Toennies mtx93 at informatik.uni-bremen.de
Fri Oct 27 14:44:57 CDT 2000


Hi

If i understand the what the code do, then they drop out 2 strings in the
name
string. The first is the name for 1 object, the 2nd for 2 or more.

I found the way, to copy the whole string very bad.

I prefer to patch the bug in this way.

Because i write now the first png-only client (i will extend him with some
fency features like shadow chaches where you can store hicolors or splitted
grafik sets, wait for my first doc), simply add then SC_VERSION to 1025.

Then change the name string to this:

"<head name of single item> \0 <head name of mult. items> \0 <tail of
item>\0"

This is smart and safe a few bytes in the package.

Don't forget the last \0, in the 1024 code the 2nd string has none and when
your
nlen is bad, there is no safe way to parse the package. So, its a real fatal
error.

Michael Toennies


    
    


More information about the crossfire mailing list