cvs: ZendEngine2(PHP_5_3) / zend_execute_API.c
[email protected] ("Antony Dovgal")
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvstony20011226480748@cvsserver> |
tony2001 Wed Nov 12 09:05:48 2008 UTC
Modified files: (Branch: PHP_5_3)
/ZendEngine2 zend_execute_API.c
Log:
make sure the slash is actually thre before reading past it
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute_API.c?r1=1.331.2.20.2.24.2.63&r2=1.331.2.20.2.24.2.64&diff_format=u
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.63 ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.64
--- ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.63 Tue Nov 11 19:45:26 2008
+++ ZendEngine2/zend_execute_API.c Wed Nov 12 09:05:48 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute_API.c,v 1.331.2.20.2.24.2.63 2008/11/11 19:45:26 stas Exp $ */
+/* $Id: zend_execute_API.c,v 1.331.2.20.2.24.2.64 2008/11/12 09:05:48 tony2001 Exp $ */
#include <stdio.h>
#include <signal.h>
@@ -517,10 +517,10 @@
Z_STRVAL_P(p) = colon + 1;
}
} else {
- char *save = actual;
+ char *save = actual, *slash;
int actual_len = Z_STRLEN_P(p);
- if (Z_TYPE_P(p) & IS_CONSTANT_UNQUALIFIED) {
- actual = (char *)zend_memrchr(actual, '\\', actual_len) + 1;
+ if ((Z_TYPE_P(p) & IS_CONSTANT_UNQUALIFIED) && (slash = (char *)zend_memrchr(actual, '\\', actual_len))) {
+ actual = slash + 1;
actual_len -= (actual - Z_STRVAL_P(p));
if (inline_change) {
actual = estrndup(actual, actual_len);