cvs: php4(PHP_4_2_0) /ext/zip zip.c
| From: | Derick Rethans | Date: | Sun, 14 Apr 2002 08:50:22 +0000 |
| Subject: | cvs: php4(PHP_4_2_0) /ext/zip zip.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11133@lists.php.net to get a copy of this message | ||
derick Sun Apr 14 04:50:22 2002 EDT
Modified files: (Branch: PHP_4_2_0)
/php4/ext/zip zip.c
Log:
- MFH: Fix NULL-termination issue
Index: php4/ext/zip/zip.c
diff -u php4/ext/zip/zip.c:1.29.2.1 php4/ext/zip/zip.c:1.29.2.2
--- php4/ext/zip/zip.c:1.29.2.1 Sat Apr 6 12:29:44 2002
+++ php4/ext/zip/zip.c Sun Apr 14 04:50:22 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zip.c,v 1.29.2.1 2002/04/06 17:29:44 derick Exp $ */
+/* $Id: zip.c,v 1.29.2.2 2002/04/14 08:50:22 derick Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -282,6 +282,7 @@
buf = emalloc(len + 1);
ret = zzip_read(entry->fp, buf, len);
+ buf[ret] = 0;
if (ret == 0) {
RETURN_FALSE;
} else {