diff options
author | marc <devnull@localhost> | 1995-12-19 17:17:37 +0000 |
---|---|---|
committer | marc <devnull@localhost> | 1995-12-19 17:17:37 +0000 |
commit | 12226f6441503a80c5d7807e67dcd96cec20ff5c (patch) | |
tree | f3d970cb4ce63e3c11bf6e4bafc60d75e1c6abb1 /lib/header.c | |
parent | b1cbf6a140ad5aef9fef465ade3a6b53da3e67d2 (diff) | |
download | rpm-12226f6441503a80c5d7807e67dcd96cec20ff5c.tar.gz rpm-12226f6441503a80c5d7807e67dcd96cec20ff5c.tar.bz2 rpm-12226f6441503a80c5d7807e67dcd96cec20ff5c.zip |
fixed bug in string array stuff in getEntry()
CVS patchset: 62
CVS date: 1995/12/19 17:17:37
Diffstat (limited to 'lib/header.c')
-rw-r--r-- | lib/header.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/header.c b/lib/header.c index b0a429cb7..d14e5c612 100644 --- a/lib/header.c +++ b/lib/header.c @@ -86,9 +86,9 @@ int nextIterator(HeaderIterator iter, *p = h->data + ntohl(index[slot].offset); } else { /* Otherwise, build up an array of char* to return */ - x = index[slot].count; - p = malloc(x * sizeof(char *)); - spp = (char **) p; + x = ntohl(index[slot].count); + *p = malloc(x * sizeof(char *)); + spp = (char **) *p; sp = h->data + ntohl(index[slot].offset); while (x--) { *spp++ = sp; @@ -436,9 +436,9 @@ int getEntry(Header h, int_32 tag, int_32 * type, void **p, int_32 * c) *p = h->data + ntohl(index->offset); } else { /* Otherwise, build up an array of char* to return */ - x = index->count; - p = malloc(x * sizeof(char *)); - spp = (char **) p; + x = ntohl(index->count); + *p = malloc(x * sizeof(char *)); + spp = (char **) *p; sp = h->data + ntohl(index->offset); while (x--) { *spp++ = sp; |