[Debburn-devel] isoinfo -x exiting immediately (status 0, no content on stdout) extracting a very large file
Thomas Schmitt
scdbackup at gmx.net
Tue Jul 1 21:01:33 UTC 2014
Hi,
> 3.1GB zip file
> attempting to use isoinfo -x to extract it exits with a status of
> success without writing any data.
Looks like a 32 bit signed int rollover in
genisoimage/diag/isoinfo.c : extract_file(struct iso_directory_record *idr)
int extent, len, tlen;
...
len = isonum_733((unsigned char *)idr->size);
while (len > 0) {
3,100,000,000 as signed int is about -1,100,000,000.
So the read-write-loop does not get entered at all.
The variable "extent" should be unsigned int, too.
It would not harm to do the same with "tlen".
unsigned int extent, len, tlen;
A single directory record can govern at most 2 exp 32 - 1 bytes.
So unsigned int or uint32_t are sufficient.
The caller of extract_file() looks like it would call it multiple
times on multi-extent files. Could be well correct by incident. :))
Have a nice day :)
Thomas
More information about the Debburn-devel
mailing list