The following commit has been merged in the master branch: commit f05f652c2bd608def3b41a4721158f08527c4b0c Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sun Dec 24 10:48:42 2006 +0100
- actually USE the copyLength for memcpy in realloc() when we already bother calculating it. :>
diff --git a/allocate.c b/allocate.c index 8977d34..71c14a5 100644 --- a/allocate.c +++ b/allocate.c @@ -127,7 +127,7 @@ void *debugRealloc(void *memoryParameter, unsigned int length, int tag) if (copyLength > chunkHeader->length) copyLength = chunkHeader->length; - memcpy(result, memoryParameter, length); + memcpy(result, memoryParameter, copyLength); debugFree(memoryParameter); }