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:
Allan McRae 2022-12-13 00:11:34 +10:00
parent 0fe764a253
commit ea83fd3927

View file

@ -348,6 +348,11 @@ int _alpm_unpack(alpm_handle_t *handle, const char *path, const char *prefix,
entryname = archive_entry_pathname(entry);
if(entryname == NULL) {
ret = 1;
goto cleanup;
}
/* If specific files were requested, skip entries that don't match. */
if(list) {
char *entry_prefix = NULL;