cvs: php4 /main streams.c
| From: | Markus Fischer | Date: | Tue, 11 Jun 2002 18:54:58 +0000 |
| Subject: | cvs: php4 /main streams.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12315@lists.php.net to get a copy of this message | ||
mfischer Tue Jun 11 14:54:58 2002 EDT
Modified files:
/php4/main streams.c
Log:
- Always \0 terminate data returned from _php_stream_copy_to_mem().
Index: php4/main/streams.c
diff -u php4/main/streams.c:1.53 php4/main/streams.c:1.54
--- php4/main/streams.c:1.53 Sat Jun 8 06:25:43 2002
+++ php4/main/streams.c Tue Jun 11 14:54:57 2002
@@ -441,7 +441,8 @@
}
}
if (len) {
- *buf = perealloc_rel_orig(*buf, len, persistent);
+ *buf = perealloc_rel_orig(*buf, len + 1, persistent);
+ (*buf)[len] = '\0';
} else {
pefree(*buf, persistent);
*buf = NULL;