mirror of
https://github.com/libarchive/libarchive.git
synced 2026-01-18 17:11:25 +01:00
Merge pull request #2831 from AZero13/check-copy-length
Use copy_length as upper-bound, not strlen(p)
This commit is contained in:
@@ -539,7 +539,7 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512],
|
||||
ret = ARCHIVE_WARN;
|
||||
}
|
||||
if (copy_length > 0) {
|
||||
if (strlen(p) > USTAR_gname_size) {
|
||||
if (copy_length > USTAR_gname_size) {
|
||||
if (tartype != 'x') {
|
||||
archive_set_error(&a->archive,
|
||||
ARCHIVE_ERRNO_MISC, "Group name too long");
|
||||
|
||||
Reference in New Issue
Block a user