Ok, so I've managed to track down things to


/* store the seekvalue of the trailer into the "z_magic" field and with
 * a 64bit off_t we overwrite z_disk/z_finaldisk as well. If you change
 * anything in zziplib or dump the trailer structure then watch out that
 * these are still unused, so that this code may still (ab)use those. */
#define __fixup_rootseek(_offset_of_trailer, _trailer)          \
                      *(zzip_off_t*)_trailer = _offset_of_trailer;

in libclamav/zziplib/zzip-zip.c at line 100.

Given that I'm compiling this on a 64bit processor, the comments seem
to indicate that the side effect is aimed at 32bit processors, and I may
be hitting a problem where this side effect isn't valid.

I'll try to augment the code with something additional, so that the additional
fields are also reset - I'm assuming that the intention was to zero these fields
out ? If so, I'd think that the actual code to zero these out would be better
placed in the code, rather than expecting side effects from address sizes; byte
order not withstanding.


Anyone know if I'm on the right lines here ?

cheers
marty



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Clamav-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-users

Reply via email to