lib/dpkg.c: don't try to dereference a NULL pointer

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
Adam D. Barratt 2013-09-24 04:56:27 +00:00
parent e643daad28
commit 8bbdf65d07

View File

@ -521,7 +521,7 @@ static collpackagelist **get_matching_low(collpackagelist **addto,
if (dep->archqual != NULL) {
if (strcmp(dep->archqual, "any") == 0) {
if (strcmp(vpkg->value.multiarch, "allowed") != 0)
if (vpkg->value.multiarch == NULL || strcmp(vpkg->value.multiarch, "allowed") != 0)
add = 0;
} else
add = 0;