Skip to content

Commit 8e847d5

Browse files
author
Lubos Kardos
committed
Sanity check that there is at least one tag in header region
1 parent ddf9ec7 commit 8e847d5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/package.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ rpmRC headerVerifyRegion(rpmTagVal regionTag,
269269
int32_t ril = 0;
270270
int32_t rdl = 0;
271271

272+
/* Check that we have at least on tag */
273+
if (il < 1) {
274+
rasprintf(buf, _("region: no tags"));
275+
goto exit;
276+
}
277+
272278
memset(entry, 0, sizeof(*entry));
273279

274280
/* Check (and convert) the 1st tag element. */

0 commit comments

Comments
 (0)