version: today's svn
I made pak0.pk3 with one empty file and got segfault. gdb showed that in:
md4.c:162
mdfour_update() calls mdfour_tail() that uses uninitialized 'm',
'm' is initialized line below the call.
I believe it would be best to remove that assigning global pointer to var in stack...
Program received signal SIGSEGV, Segmentation fault.
...
137 m->totalN += n;
(gdb) bt
#0 0x000000000043bdbc in mdfour_tail (in=0x2b445002926c "", n=0)
at code/qcommon/md4.c:137
#1 0x000000000043bed0 in mdfour_update (md=0x7fffffe56880,
in=0x2b445002926c "", n=0) at code/qcommon/md4.c:162
#2 0x000000000043bfcd in mdfour (out=0x7fffffe568e0 "\234
I could not reproduce the bug at all as it generally seems to ignore 0-byte paks. But as this thing you reported very obviously cannot be right I still fixed it to make you happy :)
Setting a QA contact on all ioquake3 bugs, even resolved ones. Sorry if you get a flood of email from this, it should only happen once. Apologies for the incovenience.
--ryan.
Program received signal SIGSEGV, Segmentation fault. ... 137 m->totalN += n; (gdb) bt #0 0x000000000043bdbc in mdfour_tail (in=0x2b445002926c "", n=0) at code/qcommon/md4.c:137 #1 0x000000000043bed0 in mdfour_update (md=0x7fffffe56880, in=0x2b445002926c "", n=0) at code/qcommon/md4.c:162 #2 0x000000000043bfcd in mdfour (out=0x7fffffe568e0 "\234