From: Nikita Popov Date: Mon, 23 Sep 2019 11:47:05 +0000 (+0200) Subject: Commit regenerated var_unserializer.c X-Git-Tag: php-7.4.0RC3~37^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a184f030a2791738700fb6afa5e60c7a03ce48d;p=php Commit regenerated var_unserializer.c --- diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c index 2f78c2120d..75f3448153 100644 --- a/ext/standard/var_unserializer.c +++ b/ext/standard/var_unserializer.c @@ -1,4 +1,4 @@ -/* Generated by re2c 1.0.3 */ +/* Generated by re2c 1.0.1 */ #line 1 "ext/standard/var_unserializer.re" /* +----------------------------------------------------------------------+ @@ -315,7 +315,7 @@ static inline int unserialize_allowed_class( #define YYMARKER marker -#line 325 "ext/standard/var_unserializer.re" +#line 323 "ext/standard/var_unserializer.re" @@ -353,12 +353,12 @@ static inline zend_long parse_iv2(const unsigned char *p, const unsigned char ** || (SIZEOF_ZEND_LONG == 4 && UNEXPECTED(p - start == MAX_LENGTH_OF_LONG - 1) && UNEXPECTED(*start > '2')) - || UNEXPECTED(result - neg > ZEND_LONG_MAX)) { + || UNEXPECTED(result > ZEND_LONG_MAX + neg)) { php_error_docref(NULL, E_WARNING, "Numerical result out of range"); return (!neg) ? ZEND_LONG_MAX : ZEND_LONG_MIN; } - return (!neg) ? (zend_long)result : -(zend_long)result; + return (zend_long) ((!neg) ? result : -result); } static inline zend_long parse_iv(const unsigned char *p) @@ -673,7 +673,7 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER, int as_key) start = cursor; -#line 679 "ext/standard/var_unserializer.c" +#line 677 "ext/standard/var_unserializer.c" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -731,9 +731,9 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER, int as_key) yy2: ++YYCURSOR; yy3: -#line 1078 "ext/standard/var_unserializer.re" +#line 1076 "ext/standard/var_unserializer.re" { return 0; } -#line 739 "ext/standard/var_unserializer.c" +#line 737 "ext/standard/var_unserializer.c" yy4: yych = *(YYMARKER = ++YYCURSOR); if (yych == ':') goto yy17; @@ -780,13 +780,13 @@ yy14: goto yy3; yy15: ++YYCURSOR; -#line 1072 "ext/standard/var_unserializer.re" +#line 1070 "ext/standard/var_unserializer.re" { /* this is the case where we have less data than planned */ php_error_docref(NULL, E_NOTICE, "Unexpected end of serialized data"); return 0; /* not sure if it should be 0 or 1 here? */ } -#line 792 "ext/standard/var_unserializer.c" +#line 790 "ext/standard/var_unserializer.c" yy17: yych = *++YYCURSOR; if (yybm[0+yych] & 128) { @@ -797,13 +797,13 @@ yy18: goto yy3; yy19: ++YYCURSOR; -#line 733 "ext/standard/var_unserializer.re" +#line 731 "ext/standard/var_unserializer.re" { *p = YYCURSOR; ZVAL_NULL(rval); return 1; } -#line 809 "ext/standard/var_unserializer.c" +#line 807 "ext/standard/var_unserializer.c" yy21: yych = *++YYCURSOR; if (yych <= '/') goto yy18; @@ -1007,7 +1007,7 @@ yy56: goto yy18; yy57: ++YYCURSOR; -#line 683 "ext/standard/var_unserializer.re" +#line 681 "ext/standard/var_unserializer.re" { zend_long id; @@ -1032,7 +1032,7 @@ yy57: return 1; } -#line 1038 "ext/standard/var_unserializer.c" +#line 1036 "ext/standard/var_unserializer.c" yy59: yych = *++YYCURSOR; if (yych == '"') goto yy80; @@ -1043,22 +1043,22 @@ yy60: goto yy18; yy61: ++YYCURSOR; -#line 739 "ext/standard/var_unserializer.re" +#line 737 "ext/standard/var_unserializer.re" { *p = YYCURSOR; ZVAL_FALSE(rval); return 1; } -#line 1055 "ext/standard/var_unserializer.c" +#line 1053 "ext/standard/var_unserializer.c" yy63: ++YYCURSOR; -#line 745 "ext/standard/var_unserializer.re" +#line 743 "ext/standard/var_unserializer.re" { *p = YYCURSOR; ZVAL_TRUE(rval); return 1; } -#line 1064 "ext/standard/var_unserializer.c" +#line 1062 "ext/standard/var_unserializer.c" yy65: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); @@ -1078,7 +1078,7 @@ yy65: } yy67: ++YYCURSOR; -#line 793 "ext/standard/var_unserializer.re" +#line 791 "ext/standard/var_unserializer.re" { #if SIZEOF_ZEND_LONG == 4 use_double: @@ -1087,7 +1087,7 @@ use_double: ZVAL_DOUBLE(rval, zend_strtod((const char *)start + 2, NULL)); return 1; } -#line 1093 "ext/standard/var_unserializer.c" +#line 1091 "ext/standard/var_unserializer.c" yy69: yych = *++YYCURSOR; if (yych <= ',') { @@ -1109,7 +1109,7 @@ yy71: goto yy18; yy72: ++YYCURSOR; -#line 751 "ext/standard/var_unserializer.re" +#line 749 "ext/standard/var_unserializer.re" { #if SIZEOF_ZEND_LONG == 4 int digits = YYCURSOR - start - 3; @@ -1135,14 +1135,14 @@ yy72: ZVAL_LONG(rval, parse_iv(start + 2)); return 1; } -#line 1141 "ext/standard/var_unserializer.c" +#line 1139 "ext/standard/var_unserializer.c" yy74: yych = *++YYCURSOR; if (yych == '"') goto yy88; goto yy18; yy75: ++YYCURSOR; -#line 708 "ext/standard/var_unserializer.re" +#line 706 "ext/standard/var_unserializer.re" { zend_long id; @@ -1167,14 +1167,14 @@ yy75: return 1; } -#line 1173 "ext/standard/var_unserializer.c" +#line 1171 "ext/standard/var_unserializer.c" yy77: yych = *++YYCURSOR; if (yych == '"') goto yy90; goto yy18; yy78: ++YYCURSOR; -#line 920 "ext/standard/var_unserializer.re" +#line 918 "ext/standard/var_unserializer.re" { size_t len, len2, len3, maxlen; zend_long elements; @@ -1326,10 +1326,10 @@ yy78: return object_common2(UNSERIALIZE_PASSTHRU, elements); } -#line 1332 "ext/standard/var_unserializer.c" +#line 1330 "ext/standard/var_unserializer.c" yy80: ++YYCURSOR; -#line 842 "ext/standard/var_unserializer.re" +#line 840 "ext/standard/var_unserializer.re" { size_t len, maxlen; zend_string *str; @@ -1363,10 +1363,10 @@ yy80: ZVAL_STR(rval, str); return 1; } -#line 1369 "ext/standard/var_unserializer.c" +#line 1367 "ext/standard/var_unserializer.c" yy82: ++YYCURSOR; -#line 876 "ext/standard/var_unserializer.re" +#line 874 "ext/standard/var_unserializer.re" { zend_long elements = parse_iv(start + 2); /* use iv() not uiv() in order to check data range */ @@ -1399,7 +1399,7 @@ yy82: return finish_nested_data(UNSERIALIZE_PASSTHRU); } -#line 1405 "ext/standard/var_unserializer.c" +#line 1403 "ext/standard/var_unserializer.c" yy84: yych = *++YYCURSOR; if (yych <= '/') goto yy18; @@ -1418,7 +1418,7 @@ yy87: goto yy18; yy88: ++YYCURSOR; -#line 909 "ext/standard/var_unserializer.re" +#line 907 "ext/standard/var_unserializer.re" { zend_long elements; if (!var_hash) return 0; @@ -1429,10 +1429,10 @@ yy88: } return object_common2(UNSERIALIZE_PASSTHRU, elements); } -#line 1435 "ext/standard/var_unserializer.c" +#line 1433 "ext/standard/var_unserializer.c" yy90: ++YYCURSOR; -#line 802 "ext/standard/var_unserializer.re" +#line 800 "ext/standard/var_unserializer.re" { size_t len, maxlen; char *str; @@ -1472,10 +1472,10 @@ yy90: } return 1; } -#line 1478 "ext/standard/var_unserializer.c" +#line 1476 "ext/standard/var_unserializer.c" yy92: ++YYCURSOR; -#line 777 "ext/standard/var_unserializer.re" +#line 775 "ext/standard/var_unserializer.re" { *p = YYCURSOR; @@ -1491,9 +1491,9 @@ yy92: return 1; } -#line 1497 "ext/standard/var_unserializer.c" +#line 1495 "ext/standard/var_unserializer.c" } -#line 1080 "ext/standard/var_unserializer.re" +#line 1078 "ext/standard/var_unserializer.re" return 0;