From c287c48d3694081822c19de0d5f6a55d021a1c0c Mon Sep 17 00:00:00 2001 From: ewt Date: Fri, 27 Mar 1998 17:25:55 +0000 Subject: [PATCH] an extraneous memcpy() was floating around in headerAppendEntry(), which caused some reading from unallocated stack regions CVS patchset: 2053 CVS date: 1998/03/27 17:25:55 --- CHANGES | 1 + lib/header.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 81310d8..79e8e7e 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,7 @@ - added doc/triggers - strntoul() in lib/cpio.c was returning a pointer to freed memory + - headerAppend() was doing a bad memcpy() 2.4.103 -> 2.4.104: - fixed popt/Makefile.in to use CPP from configure diff --git a/lib/header.c b/lib/header.c index 0077a6b..dcd21cd 100644 --- a/lib/header.c +++ b/lib/header.c @@ -1073,8 +1073,6 @@ int headerAppendEntry(Header h, int_32 tag, int_32 type, void * p, int_32 c) { length = dataLength(type, p, c, 0); entry->data = realloc(entry->data, entry->length + length); - memcpy(((char *) entry->data) + entry->length, p, length); - copyData(type, ((char *) entry->data) + entry->length, p, c, length); entry->length += length; -- 2.7.4