When rejecting rediculously large pax attributes (such as pathnames

over 1MB), issue a warning instead of forcing an internal assertion
failure.
This commit is contained in:
Tim Kientzle 2005-03-13 02:35:52 +00:00
parent 37652939bc
commit 516788f9a0

View File

@ -1020,8 +1020,11 @@ pax_header(struct archive *a, struct tar *tar, struct archive_entry *entry,
return (-1);
line_length *= 10;
line_length += *p - '0';
if (line_length > 999999)
return (-1);
if (line_length > 999999) {
archive_set_error(a, ARCHIVE_ERRNO_MISC,
"Rejecting pax extended attribute > 1MB");
return (ARCHIVE_WARN);
}
p++;
l--;
}