1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 11:42:17 +02:00

Restore end check for "escape" strings (not needed for single-quoted strings as they can't have an unescaped backslash at the end)

This commit is contained in:
Matt Wilmas
2008-05-10 09:15:17 +00:00
parent 6f9fecae56
commit ff34ca0b93
2 changed files with 403 additions and 387 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -986,6 +986,10 @@ static int zend_scan_unicode_escape_string(zval *zendlval, char *str, int len, U
if (*s==0x5C /*'\\'*/) {
s++;
c = *s;
if (s >= end) {
*t++ = 0x5C; /*'\\'*/
break;
}
min_digits = 0;
codepoint = 0;
@@ -1186,6 +1190,10 @@ static void zend_scan_binary_escape_string(zval *zendlval, char *str, int len, c
while (s<end) {
if (*s=='\\') {
s++;
if (s >= end) {
*t++ = '\\';
break;
}
switch(*s) {
case 'n':