iliaa Wed Aug 13 20:37:42 2003 EDT
Modified files:
/php-src/ext/standard assert.c
Log:
Fixed a possible crash due to invalid handling of assert ini options.
Index: php-src/ext/standard/assert.c
diff -u php-src/ext/standard/assert.c:1.56 php-src/ext/standard/assert.c:1.57
--- php-src/ext/standard/assert.c:1.56 Tue Jun 10 16:03:37 2003
+++ php-src/ext/standard/assert.c Wed Aug 13 20:37:42 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: assert.c,v 1.56 2003/06/10 20:03:37 imajes Exp $ */
+/* $Id: assert.c,v 1.57 2003/08/14 00:37:42 iliaa Exp $ */
/* {{{ includes/startup/misc */
@@ -56,12 +56,9 @@
zval_ptr_dtor(&ASSERTG(callback));
}
- MAKE_STD_ZVAL(ASSERTG(callback));
-
- if (new_value) {
+ if (new_value && (ASSERTG(callback) || new_value_length)) {
+ MAKE_STD_ZVAL(ASSERTG(callback));
ZVAL_STRINGL(ASSERTG(callback), new_value, new_value_length, 1);
- } else {
- ZVAL_EMPTY_STRING(ASSERTG(callback));
}
return SUCCESS;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php