summaryrefslogtreecommitdiff
path: root/lib/header.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/header.c')
-rw-r--r--lib/header.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/header.c b/lib/header.c
index 267bd7cfe..9766f5b51 100644
--- a/lib/header.c
+++ b/lib/header.c
@@ -431,6 +431,9 @@ Header headerLoad(void *pv)
entry->info.count = htonl(pe->count);
entry->info.offset = -1;
+ if (entry->info.type < RPM_MIN_TYPE ||
+ entry->info.type > RPM_MAX_TYPE) return NULL;
+
src = dataStart + htonl(pe->offset);
entry->length = dataLength(entry->info.type, src,
entry->info.count, 1);