summaryrefslogtreecommitdiff
path: root/libarchive/archive_entry_xattr.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2016-05-11 10:19:44 +0000
committerMartin Matuska <mm@FreeBSD.org>2016-05-11 10:19:44 +0000
commit4e579f6c9425c995106fbf72667f4ec7e5d5db85 (patch)
treed298bb9fa3cf4f58e328e696a77fadf758a534eb /libarchive/archive_entry_xattr.c
parent8c8f03ca5b7f1f0d07c23e7c354a45b7c95335f0 (diff)
Diffstat (limited to 'libarchive/archive_entry_xattr.c')
-rw-r--r--libarchive/archive_entry_xattr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libarchive/archive_entry_xattr.c b/libarchive/archive_entry_xattr.c
index a3efe7ca8d9f..05eb90f1afd1 100644
--- a/libarchive/archive_entry_xattr.c
+++ b/libarchive/archive_entry_xattr.c
@@ -98,7 +98,10 @@ archive_entry_xattr_add_entry(struct archive_entry *entry,
/* XXX Error XXX */
return;
- xp->name = strdup(name);
+ if ((xp->name = strdup(name)) == NULL)
+ /* XXX Error XXX */
+ return;
+
if ((xp->value = malloc(size)) != NULL) {
memcpy(xp->value, value, size);
xp->size = size;