]> git.ipfire.org Git - pakfire.git/commitdiff
archive: Check if we actually really absolutely have a buffer
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Oct 2024 15:40:10 +0000 (15:40 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Oct 2024 15:40:10 +0000 (15:40 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/archive.c

index af3c3d9f0c08b171a08775aae58280df136f3e66..088c9189ab72e22aa09306b75467034facef0ea5 100644 (file)
@@ -569,6 +569,12 @@ static int __pakfire_archive_read_metadata(struct pakfire_archive* archive,
                goto ERROR;
        }
 
+       // Make the static analyzer happy which thinks this could be NULL
+       if (!data) {
+               r = -EINVAL;
+               goto ERROR;
+       }
+
        // Format >= 6
        if (archive->format >= 6) {
                // Parse PKGINFO