cvs: php4 /ext/bz2 bz2.c
| From: | Sterling Hughes | Date: | Thu, 21 Mar 2002 16:51:03 +0000 |
| Subject: | cvs: php4 /ext/bz2 bz2.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-10535@lists.php.net to get a copy of this message | ||
sterling Thu Mar 21 11:51:03 2002 EDT
Modified files:
/php4/ext/bz2 bz2.c
Log:
NUL terminate
Index: php4/ext/bz2/bz2.c
diff -u php4/ext/bz2/bz2.c:1.40 php4/ext/bz2/bz2.c:1.41
--- php4/ext/bz2/bz2.c:1.40 Thu Mar 21 11:41:24 2002
+++ php4/ext/bz2/bz2.c Thu Mar 21 11:51:01 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: bz2.c,v 1.40 2002/03/21 16:41:24 sterling Exp $ */
+/* $Id: bz2.c,v 1.41 2002/03/21 16:51:01 sterling Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -374,6 +374,7 @@
/* Copy the buffer, we have perhaps allocate alot more than we need,
so we erealloc() the buffer to the proper size */
dest = erealloc(dest, size + 1);
+ dest[size] = 0;
RETURN_STRINGL(dest, size, 0);
}
}
@@ -439,6 +440,7 @@
/* we might have allocated a little to much, so erealloc the buffer
down to size, before returning it */
dest = erealloc(dest, size + 1);
+ dest[size] = 0;
RETURN_STRINGL(dest, size, 0);
}
}