]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
compress: Read path again on extraction
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 16 Sep 2022 13:25:57 +0000 (13:25 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 16 Sep 2022 13:25:57 +0000 (13:25 +0000)
The former pointer was invalid and we logged invalid data.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/compress.c

index 3eefcea1881cc3470cc82e45f22168b679a3b049..1c7c38a3b821fbad8075cecc68bfdb96a1333f76 100644 (file)
@@ -722,6 +722,9 @@ static int __pakfire_extract(struct pakfire* pakfire, struct archive* a,
 
        // Create file & extract payload
        if (data->writer) {
+               // Fetch path again since we changed it
+               path = archive_entry_pathname(entry);
+
                DEBUG(pakfire, "Extracting %s\n", path);
 
                r = archive_read_extract2(data->archive, entry, data->writer);