patch: unzip succeeds with CRC errors

Paul Fox pgf at brightstareng.com
Wed Mar 29 14:28:47 UTC 2006


 > > >  > busybox tar behaves like busybox unzip did -- it reports the error,
 > > >  > and exits successfully.  having just fixed this in unzip, i'll take
 > > >  > a look at tar.
 > > >
 > > > i looked, and i can say that i definitely don't have time.  the
 > > > layering is deeper than it was with unzip, and the retesting more
 > > > time-consuming.  someone else can handle this one.
 > > 
 > > This looks like a job for Glenn McGrath!
 > > 
 > > Paul: could you explain to Glenn what you want to do to tar?  (And anything 
 > > you didn't do to unzip that you still want to do?)  He wrote the current 
 > > archiving library code, and actually seems to understand it. :)
 > 
 > Yea, i can have a look at it, off the top of my head i think
 > tar/ar/cpio will all fail straight away if the headers field checks
 > fail.
 > 
 > I guess the thinking was that if the headers get out of alignment then
 > it would be pretty compplex thrying to align them again.

yes, you've described the current behavior correctly.  the problem
is that after detecting the error, the exit code from tar (i didn't
try ar/cpio) is 0.  so while an interactive user will probably
spot the error, a script will not.

what makes it hard to fix isn't necessarily the error propagation
itself, it's all the possible combinations of clients and
extraction "plugins".  at least, that was my first take on it.

paul
=---------------------
 paul fox, pgf at brightstareng.com



More information about the busybox mailing list