Hello fellows,
as I prommised,
I tweaked a first pile of software to suppress the compiler warnings.
I tweaked the unlha project, yet.
I got some warnings, which have the same reason:
I)
typedef struct LzHeader
{
...
unsigned char header_size;
...
}
should use unsigned short instead.
Otherwise there are lots of locations with the threat of integer overflow!
II)
class CLhaArchive
{
...
protected:
short *child, *parent, *block, *edge, *stock, *node;
...
}
In methods like
void CLhaArchive::reconst(int start, int end)
all of the looping vars are int (32bit) and not short (16bit).
This might resume in (dangerous?) index overflows!
Either we reduce all looping vars to shorts,
or reset the short pointers to 'unsigned int'!
I am not an expet, but these inex over/underflows
might be a dangerous security leak!!
Yours,
Leo
P.S.: where shall I post a first patch file?
Getting feedback would be helpful!