On Tuesday 06 November 2007 19:30, Paul Fox wrote: > hi -- > > i commited a fix for unzip yesterday, and it occurs to me that i > should probably mention it, since it's probably a candidate for > 1.8.1. (the svn rev is r20369.)
It is there: http://busybox.net/downloads/fixes-1.8.0/busybox-1.8.0-unzip.patch > it turs out that at least some gcc versions (our is 3.4.1 for > arm) don't fully pack structures properly -- in the case of the > zip header, the elements of the structure are packed, but the end > of the struct is padded from 26 out to 28 bytes. unzip was > changed recently to do two things: a) verify that the structure > is exactly 26 bytes, and b) use sizeof(zip_header) when reading > the header. i fixed unzip.c to a) change the size check so that > a struct that is only too long will pass the test, and b) changed > the read back to using a constant value of 26. > > vda -- regarding your svn 20370/20372 -- are you sure that that warning > about ATTRIBUTE_PACKED is spurious? does ATTRIBUTE_PACKED make > sense on a union? i tried the same thing and backed it out > because of the warning. Well, I expected that PACKED there will let gcc know that entire union should be packed too. There should be a way to suppress that extra two bytes on ARM, right? Maybe PACKED will even work on ARM, I didn't check, but on i386 gcc complains. -- vda _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
