Exit with ARCHIVE_FATAL if the ISO image is truncated.

This commit is contained in:
Tim Kientzle 2009-04-26 18:43:49 +00:00
parent c49388ad34
commit 6388433b62

View File

@ -683,7 +683,7 @@ archive_read_format_iso9660_read_data(struct archive_read *a,
if (bytes_read == 0)
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"Truncated input file");
if (buff == NULL)
if (*buff == NULL)
return (ARCHIVE_FATAL);
if (bytes_read > iso9660->entry_bytes_remaining)
bytes_read = iso9660->entry_bytes_remaining;