ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Waldin <>
Subject [PATCH] TarBuffer cycles forever on some TAR inputs
Date Wed, 16 Jun 2004 00:05:07 GMT
Some TAR files do not adhere to a fixed block size, and so they seem to 
end abrubtly in the middle of a block.  These files are definitely in 
error, but do appear to be somewhat common.  The code does attempt to handle these files 
but this attempt results in an infinite cycle when reading the last 
block on certain files, such as the TAR file found within:

The last block is read repeatedly forever as the input buffer is left 
unclean and the data found earlier is mistakenly parsed as new TAR 
entries.  The attached patch fixes this case by zeroing out unread 
portions of the input buffer when foreshortened input files are encountered.


View raw message