]> granicus.if.org Git - php/commitdiff
MFH: Restore end check for "escape" strings
authorMatt Wilmas <mattwil@php.net>
Sat, 10 May 2008 09:18:27 +0000 (09:18 +0000)
committerMatt Wilmas <mattwil@php.net>
Sat, 10 May 2008 09:18:27 +0000 (09:18 +0000)
Zend/zend_language_scanner.l

index 81881eee4429c1be2a4b1eb599528b7f59745f1d..47d1165b813a2a8be6dce595842359daa99e697f 100644 (file)
@@ -792,6 +792,10 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
        while (s<end) {
                if (*s=='\\') {
                        s++;
+                       if (s >= end) {
+                               *t++ = '\\';
+                               break;
+                       }
 
                        switch(*s) {
                                case 'n':