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:
parent
37652939bc
commit
516788f9a0
@ -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--;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user