diff options
| author | Martin Matuska <mm@FreeBSD.org> | 2016-05-11 10:19:44 +0000 | 
|---|---|---|
| committer | Martin Matuska <mm@FreeBSD.org> | 2016-05-11 10:19:44 +0000 | 
| commit | 4e579f6c9425c995106fbf72667f4ec7e5d5db85 (patch) | |
| tree | d298bb9fa3cf4f58e328e696a77fadf758a534eb /libarchive/archive_entry_xattr.c | |
| parent | 8c8f03ca5b7f1f0d07c23e7c354a45b7c95335f0 (diff) | |
Diffstat (limited to 'libarchive/archive_entry_xattr.c')
| -rw-r--r-- | libarchive/archive_entry_xattr.c | 5 | 
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;  | 
