From ded0c513836cee2f237edc2e28ee8aec261fd675 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 24 Nov 2009 16:57:46 +0200 Subject: Dont blow up on headers without requireflags in rpmdsNew() --- lib/rpmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rpmds.c') diff --git a/lib/rpmds.c b/lib/rpmds.c index aec5f6a77..3f92ab823 100644 --- a/lib/rpmds.c +++ b/lib/rpmds.c @@ -155,7 +155,7 @@ rpmds rpmdsNew(Header h, rpmTag tagN, int flags) headerGet(h, tagF, &flags, hgflags); ds->Flags = flags.data; /* ensure rpmlib() requires always have RPMSENSE_RPMLIB flag set */ - if (tagN == RPMTAG_REQUIRENAME) { + if (tagN == RPMTAG_REQUIRENAME && ds->Flags) { for (int i = 0; i < ds->Count; i++) { if (!(ds->Flags[i] & RPMSENSE_RPMLIB) && rstreqn(ds->N[i], "rpmlib(", sizeof("rpmlib(")-1)) -- cgit v1.2.3