diff options
author | Martin Matuska <mm@FreeBSD.org> | 2016-05-16 04:47:32 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2016-05-16 04:47:32 +0000 |
commit | 8eb6639196dbcd2a7e6bb657a72046fd4445cc9f (patch) | |
tree | e4217ace1cd7264f3e95786a0bb137ea239f3024 /libarchive/archive_read_support_format_cpio.c | |
parent | cf8cc1c88406d9c2a9337df1792143e887e4595e (diff) | |
download | src-8eb6639196dbcd2a7e6bb657a72046fd4445cc9f.tar.gz src-8eb6639196dbcd2a7e6bb657a72046fd4445cc9f.zip |
Update vendor/libarchvie to git commit 860ec63
Integrates my pull request #709
Notes
Notes:
svn path=/vendor/libarchive/dist/; revision=299895
Diffstat (limited to 'libarchive/archive_read_support_format_cpio.c')
-rw-r--r-- | libarchive/archive_read_support_format_cpio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libarchive/archive_read_support_format_cpio.c b/libarchive/archive_read_support_format_cpio.c index c2ca85bd3ad9..b09db0e9a59b 100644 --- a/libarchive/archive_read_support_format_cpio.c +++ b/libarchive/archive_read_support_format_cpio.c @@ -401,6 +401,11 @@ archive_read_format_cpio_read_header(struct archive_read *a, /* If this is a symlink, read the link contents. */ if (archive_entry_filetype(entry) == AE_IFLNK) { + if (cpio->entry_bytes_remaining > 1024 * 1024) { + archive_set_error(&a->archive, ENOMEM, + "Rejecting malformed cpio archive: symlink contents exceed 1 megabyte"); + return (ARCHIVE_FATAL); + } h = __archive_read_ahead(a, (size_t)cpio->entry_bytes_remaining, NULL); if (h == NULL) |