|
|
|
@ -1009,7 +1009,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot |
|
|
|
|
|
|
|
if (!valid) { |
|
|
|
zend_throw_exception(zend_ce_parse_error, |
|
|
|
"Invalid UTF-8 codepoint escape sequence", E_PARSE); |
|
|
|
"Invalid UTF-8 codepoint escape sequence", 0); |
|
|
|
zval_ptr_dtor(zendlval); |
|
|
|
return FAILURE; |
|
|
|
} |
|
|
|
@ -1020,7 +1020,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot |
|
|
|
/* per RFC 3629, UTF-8 can only represent 21 bits */ |
|
|
|
if (codepoint > 0x10FFFF || errno) { |
|
|
|
zend_throw_exception(zend_ce_parse_error, |
|
|
|
"Invalid UTF-8 codepoint escape sequence: Codepoint too large", E_PARSE); |
|
|
|
"Invalid UTF-8 codepoint escape sequence: Codepoint too large", 0); |
|
|
|
zval_ptr_dtor(zendlval); |
|
|
|
return FAILURE; |
|
|
|
} |
|
|
|
@ -1658,7 +1658,7 @@ NEWLINE ("\r"|"\n"|"\r\n") |
|
|
|
* Because the lexing itself doesn't do that for us |
|
|
|
*/ |
|
|
|
if (end != yytext + yyleng) { |
|
|
|
zend_throw_exception(zend_ce_parse_error, "Invalid numeric literal", E_PARSE); |
|
|
|
zend_throw_exception(zend_ce_parse_error, "Invalid numeric literal", 0); |
|
|
|
RETURN_TOKEN(T_ERROR); |
|
|
|
} |
|
|
|
} else { |
|
|
|
@ -1675,7 +1675,7 @@ NEWLINE ("\r"|"\n"|"\r\n") |
|
|
|
/* Also not an assert for the same reason */ |
|
|
|
if (end != yytext + yyleng) { |
|
|
|
zend_throw_exception(zend_ce_parse_error, |
|
|
|
"Invalid numeric literal", E_PARSE); |
|
|
|
"Invalid numeric literal", 0); |
|
|
|
RETURN_TOKEN(T_ERROR); |
|
|
|
} |
|
|
|
ZEND_ASSERT(!errno); |
|
|
|
@ -1683,7 +1683,7 @@ NEWLINE ("\r"|"\n"|"\r\n") |
|
|
|
} |
|
|
|
/* Also not an assert for the same reason */ |
|
|
|
if (end != yytext + yyleng) { |
|
|
|
zend_throw_exception(zend_ce_parse_error, "Invalid numeric literal", E_PARSE); |
|
|
|
zend_throw_exception(zend_ce_parse_error, "Invalid numeric literal", 0); |
|
|
|
RETURN_TOKEN(T_ERROR); |
|
|
|
} |
|
|
|
} |
|
|
|
|