[pacman-dev] [PATCH v5 1/6] Check if a file is in the package's file list before extracting
Florian Pritz
bluewind at xinu.at
Sun Feb 9 14:24:36 EST 2014
Signed-off-by: Florian Pritz <bluewind at xinu.at>
---
lib/libalpm/add.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index f38afef..1199d30 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -178,6 +178,11 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive,
archive_read_data_skip(archive);
return 0;
} else {
+ if (!alpm_filelist_contains(&newpkg->files, entryname)) {
+ _alpm_log(handle, ALPM_LOG_WARNING, _("file not found in file list for package %s. skipping extraction of %s\n"),
+ newpkg->name, entryname);
+ return 0;
+ }
/* build the new entryname relative to handle->root */
snprintf(filename, PATH_MAX, "%s%s", handle->root, entryname);
}
--
1.8.5.3
More information about the pacman-dev
mailing list