[Debburn-changes] r800 - cdrkit/trunk/genisoimage
93sam at alioth.debian.org
93sam at alioth.debian.org
Sun May 25 20:21:35 UTC 2008
Author: 93sam
Date: 2008-05-25 20:21:29 +0000 (Sun, 25 May 2008)
New Revision: 800
Modified:
cdrkit/trunk/genisoimage/joliet.c
Log:
Fix for a potential memory corruption bug, found using valgrind when
tracking another bug.
Modified: cdrkit/trunk/genisoimage/joliet.c
===================================================================
--- cdrkit/trunk/genisoimage/joliet.c 2008-03-17 22:59:14 UTC (rev 799)
+++ cdrkit/trunk/genisoimage/joliet.c 2008-05-25 20:21:29 UTC (rev 800)
@@ -242,8 +242,9 @@
* inplace copy, and we need to make a temporary working copy first.
*/
if (source == NULL) {
- tmpbuf = (Uchar *) e_malloc(size);
+ tmpbuf = (Uchar *) e_malloc(size+1);
memcpy(tmpbuf, buffer, size);
+ tmpbuf[size] = 0;
} else {
tmpbuf = (Uchar *) source;
}
More information about the Debburn-changes
mailing list