cvs: Zend / zend_builtin_functions.c
| From: | Derick Rethans | Date: | Wed, 08 May 2002 14:07:33 +0000 |
| Subject: | cvs: Zend / zend_builtin_functions.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-101@lists.php.net to get a copy of this message | ||
derick Wed May 8 10:07:33 2002 EDT
Modified files:
/Zend zend_builtin_functions.c
Log:
- Fix for bug #17096
Index: Zend/zend_builtin_functions.c
diff -u Zend/zend_builtin_functions.c:1.114 Zend/zend_builtin_functions.c:1.115
--- Zend/zend_builtin_functions.c:1.114 Sat Mar 2 08:47:15 2002
+++ Zend/zend_builtin_functions.c Wed May 8 10:07:33 2002
@@ -178,6 +178,11 @@
convert_to_long_ex(z_requested_offset);
requested_offset = (*z_requested_offset)->value.lval;
+ if (requested_offset < 0) {
+ zend_error(E_WARNING, "func_get_arg(): The argument number should be >= 0");
+ RETURN_FALSE;
+ }
+
p = EG(argument_stack).top_element-1-1;
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_get_arg(); */
p -= 1+arg_count;