cvs: php4 /main php_variables.c
| From: | Yasuo Ohgaki | Date: | Thu, 08 Aug 2002 03:08:55 +0000 |
| Subject: | cvs: php4 /main php_variables.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-13204@lists.php.net to get a copy of this message | ||
yohgaki Wed Aug 7 23:08:55 2002 EDT
Modified files:
/php4/main php_variables.c
Log:
Add some assertion
Index: php4/main/php_variables.c
diff -u php4/main/php_variables.c:1.40 php4/main/php_variables.c:1.41
--- php4/main/php_variables.c:1.40 Fri Aug 2 02:53:48 2002
+++ php4/main/php_variables.c Wed Aug 7 23:08:54 2002
@@ -16,7 +16,7 @@
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_variables.c,v 1.40 2002/08/02 06:53:48 hirokawa Exp $ */
+/* $Id: php_variables.c,v 1.41 2002/08/08 03:08:54 yohgaki Exp $ */
#include <stdio.h>
#include "php.h"
@@ -39,7 +39,8 @@
PHPAPI void php_register_variable_safe(char *var, char *strval, int str_len, zval *track_vars_array
TSRMLS_DC)
{
zval new_entry;
-
+ assert(strval != NULL);
+
/* Prepare value */
Z_STRLEN(new_entry) = str_len;
if (PG(magic_quotes_gpc)) {
@@ -64,6 +65,8 @@
HashTable *symtable1=NULL;
HashTable *symtable2=NULL;
+ assert(var != NULL);
+
if (PG(register_globals)) {
symtable1 = EG(active_symbol_table);
}