1
0
mirror of https://github.com/php/php-src.git synced 2026-04-11 01:53:36 +02:00

Duplicate property value, otherwise parser would free it and we're in bad shape.

This commit is contained in:
Stanislav Malyshev
2001-01-08 20:10:16 +00:00
parent d812ecb75f
commit 77ebea3a6f

View File

@@ -92,7 +92,7 @@ static void php_browscap_parser_cb(zval *arg1, zval *arg2, int callback_type, vo
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;