summaryrefslogtreecommitdiff
path: root/lib/header.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1998-08-11 18:24:48 +0000
committerjbj <devnull@localhost>1998-08-11 18:24:48 +0000
commitf612cb1bf38b0179bff78ed1b9303af287745ca3 (patch)
treefa252385d05526ee272fc7a3b57419d1934ee31c /lib/header.c
parent8ff713d13030f2f598e33535366f785047bd50e4 (diff)
downloadlibrpm-tizen-f612cb1bf38b0179bff78ed1b9303af287745ca3.tar.gz
librpm-tizen-f612cb1bf38b0179bff78ed1b9303af287745ca3.tar.bz2
librpm-tizen-f612cb1bf38b0179bff78ed1b9303af287745ca3.zip
Sync with 2.5.2 branch patches.
cpio_gzip: dup the fd before doing gzdopen (Thanks Erik!) add --noLang to skip non-default languages. CVS patchset: 2243 CVS date: 1998/08/11 18:24:48
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);