Skip to content

Commit

Permalink
Sanity check that there is at least one tag in header region
Browse files Browse the repository at this point in the history
  • Loading branch information
lkardos committed Nov 27, 2015
1 parent ddf9ec7 commit 8e847d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/package.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ rpmRC headerVerifyRegion(rpmTagVal regionTag,
int32_t ril = 0;
int32_t rdl = 0;

/* Check that we have at least on tag */
if (il < 1) {
rasprintf(buf, _("region: no tags"));
goto exit;
}

memset(entry, 0, sizeof(*entry));

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

0 comments on commit 8e847d5

Please sign in to comment.