]> git.ipfire.org Git - pakfire.git/commitdiff
archive: Do not try to compare empty arch
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 30 Apr 2021 11:14:33 +0000 (11:14 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 30 Apr 2021 11:14:33 +0000 (11:14 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/archive.c

index f9e417e997bcdd9ece589da5d2e1983e161606ef..5e01016690208e3e8879bad8c8b030d39a662d38 100644 (file)
@@ -1385,7 +1385,7 @@ PAKFIRE_EXPORT PakfirePackage pakfire_archive_make_package(PakfireArchive archiv
                Legacy package formats use "arch = all" for source packages.
                We need to check for "type = source" and then reset arch
        */
-       if (strcmp(arch, "all") == 0) {
+       if (arch && strcmp(arch, "all") == 0) {
                char* type = pakfire_archive_get(archive, "package", "type");
                if (type) {
                        if (strcmp(type, "source") == 0) {