Catch possible error in archive_entry_pathname when extracting files
Prevents a null deference on error. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
0fe764a253
commit
ea83fd3927
1 changed files with 5 additions and 0 deletions
|
@ -348,6 +348,11 @@ int _alpm_unpack(alpm_handle_t *handle, const char *path, const char *prefix,
|
||||||
|
|
||||||
entryname = archive_entry_pathname(entry);
|
entryname = archive_entry_pathname(entry);
|
||||||
|
|
||||||
|
if(entryname == NULL) {
|
||||||
|
ret = 1;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
/* If specific files were requested, skip entries that don't match. */
|
/* If specific files were requested, skip entries that don't match. */
|
||||||
if(list) {
|
if(list) {
|
||||||
char *entry_prefix = NULL;
|
char *entry_prefix = NULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue