cvs: php4 /ext/standard browscap.c
| From: | Stanislav Malyshev | Date: | Mon, 08 Jan 2001 20:10:16 +0000 |
| Subject: | cvs: php4 /ext/standard browscap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-3489@lists.php.net to get a copy of this message | ||
stas Mon Jan 8 12:10:16 2001 EDT
Modified files:
/php4/ext/standard browscap.c
Log:
Duplicate property value, otherwise parser would free it and we're in bad shape.
Index: php4/ext/standard/browscap.c
diff -u php4/ext/standard/browscap.c:1.39 php4/ext/standard/browscap.c:1.40
--- php4/ext/standard/browscap.c:1.39 Mon Jan 8 11:45:12 2001
+++ php4/ext/standard/browscap.c Mon Jan 8 12:10:16 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: browscap.c,v 1.39 2001/01/08 19:45:12 stas Exp $ */
+/* $Id: browscap.c,v 1.40 2001/01/08 20:10:16 stas Exp $ */
#include "php.h"
#include "php_regex.h"
@@ -92,7 +92,7 @@
new_property = (zval *) malloc(sizeof(zval));
INIT_PZVAL(new_property);
- new_property->value.str.val = Z_STRVAL_P(arg2);
+ new_property->value.str.val = zend_strndup(Z_STRVAL_P(arg2), Z_STRLEN_P(arg2));
new_property->value.str.len = Z_STRLEN_P(arg2);
new_property->type = IS_STRING;