diff options
author | Demi Marie Obenour <demi@invisiblethingslab.com> | 2022-01-27 11:47:28 -0500 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2022-03-31 13:16:38 +0300 |
commit | 619ef3edc5b7958184954a513b3f5cbe22aee5f2 (patch) | |
tree | 730afe4133281082cbf4948aaec86810ba2ab13e | |
parent | 6d3ce1c96833e896f082df81c727687da130f416 (diff) | |
download | rpm-619ef3edc5b7958184954a513b3f5cbe22aee5f2.tar.gz |
Fix inverted logic in base2bin()
headerGet() returning 0 is an error condition.
-rw-r--r-- | lib/rpmfi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rpmfi.c b/lib/rpmfi.c index f27cb0ff7..9f5b8fb9e 100644 --- a/lib/rpmfi.c +++ b/lib/rpmfi.c @@ -1586,7 +1586,7 @@ static uint8_t *base2bin(Header h, rpmTagVal tag, rpm_count_t num, int *len) size_t *lengths = xcalloc(num, sizeof(size_t)); const char *s; - if (headerGet(h, tag, &td, HEADERGET_MINMEM) && rpmtdCount(&td) != num) + if (!headerGet(h, tag, &td, HEADERGET_MINMEM) || rpmtdCount(&td) != num) goto out; while ((s = rpmtdNextString(&td))) { |