tony2001 Mon Oct 18 11:05:06 2004 EDT Modified files: /php-src/main php_variables.c Log: fix bug #30442 ( segmentation fault when parsing ?getvariable[][ ) http://cvs.php.net/diff.php/php-src/main/php_variables.c?r1=1.82&r2=1.83&ty=u Index: php-src/main/php_variables.c diff -u php-src/main/php_variables.c:1.82 php-src/main/php_variables.c:1.83 --- php-src/main/php_variables.c:1.82 Thu Sep 9 12:10:24 2004 +++ php-src/main/php_variables.c Mon Oct 18 11:05:06 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_variables.c,v 1.82 2004/09/09 16:10:24 rasmus Exp $ */ +/* $Id: php_variables.c,v 1.83 2004/10/18 15:05:06 tony2001 Exp $ */ #include <stdio.h> #include "php.h" @@ -133,7 +133,11 @@ if (!ip) { /* PHP variables cannot contain '[' in their names, so we replace the character with a '_' */ *(index_s - 1) = '_'; - index_len = var_len = strlen(index); + + index_len = var_len = 0; + if (index) { + index_len = var_len = strlen(index); + } goto plain_var; return; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php