path: root/libarchive/archive_string.c
diff options
authorMartin Matuska <mm@FreeBSD.org>2017-05-03 23:55:12 +0000
committerMartin Matuska <mm@FreeBSD.org>2017-05-03 23:55:12 +0000
commit87a07d9d6c9aca33aa7189ddf8dc13fd4ed795e9 (patch)
treeb8ac4af3d780f51917c8a060892b1633cce98aca /libarchive/archive_string.c
parent659b8836cb5cd1ff479c8644211f190e1ad9619d (diff)
Update vendor/libarchive to git c253f0aae9ac86a617b4f814137e07757df72391
Vendor changes (FreeBSD-related): PR 897: test for ZIP archives with invalid EOCD headers PR 901: fix invalid renaming of sparse files OSS-Fuzz issue 497: remove fallback tree in LZX decoder OSS-Fuzz issue 527: rewrite expressions in lz4 filter OSS-Fuzz issue 577: fix integer overflow in cpio reader OSS-Fuzz issue 862: fix numerc parsing in mtree reader OSS-Fuzz issue 1097: fix undefined shift in rar reader cpio: various optimizations and memory leak fixes
Notes: svn path=/vendor/libarchive/dist/; revision=317781
Diffstat (limited to 'libarchive/archive_string.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/libarchive/archive_string.c b/libarchive/archive_string.c
index 592ead2bdd58..5ae09b626cbc 100644
--- a/libarchive/archive_string.c
+++ b/libarchive/archive_string.c
@@ -202,7 +202,8 @@ archive_string_append(struct archive_string *as, const char *p, size_t s)
if (archive_string_ensure(as, as->length + s + 1) == NULL)
return (NULL);
- memmove(as->s + as->length, p, s);
+ if (s)
+ memmove(as->s + as->length, p, s);
as->length += s;
as->s[as->length] = 0;
return (as);