summaryrefslogtreecommitdiff
path: root/rpmdb
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-09-04 18:08:12 +0000
committerjbj <devnull@localhost>2002-09-04 18:08:12 +0000
commit77ec71122fbacfc073c52196b953c69e26c37869 (patch)
tree9835ad4535bf10fc9cba5594dfc6c8ac3d2c85e4 /rpmdb
parentdfdb8d487f84e43df3e18143e0ac13f70d742a25 (diff)
downloadrpm-77ec71122fbacfc073c52196b953c69e26c37869.tar.gz
rpm-77ec71122fbacfc073c52196b953c69e26c37869.tar.bz2
rpm-77ec71122fbacfc073c52196b953c69e26c37869.zip
- fix: register SIGCHLD handler before forking (#73134).
CVS patchset: 5704 CVS date: 2002/09/04 18:08:12
Diffstat (limited to 'rpmdb')
-rw-r--r--rpmdb/header.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rpmdb/header.c b/rpmdb/header.c
index 9c2ce1bc3..d0c1592e0 100644
--- a/rpmdb/header.c
+++ b/rpmdb/header.c
@@ -341,9 +341,8 @@ unsigned int headerSizeof(/*@null@*/ Header h, enum hMagic magicp)
* @param pend pointer to end of data (or NULL)
* @return no. bytes in data, -1 on failure
*/
-/*@mayexit@*/
static int dataLength(int_32 type, hPTR_t p, int_32 count, int onDisk,
- hPTR_t pend)
+ /*@null@*/ hPTR_t pend)
/*@*/
{
const unsigned char * s = p;
@@ -1884,6 +1883,8 @@ int headerAppendEntry(Header h, int_32 tag, int_32 type,
return 0;
length = dataLength(type, p, c, 0, NULL);
+ if (length < 0)
+ return 0;
if (ENTRY_IN_REGION(entry)) {
char * t = xmalloc(entry->length + length);