File tree Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 9
9
(cmb, Nikita)
10
10
. Fixed bug #78441 (Parse error due to heredoc identifier followed by digit).
11
11
(cmb)
12
+ . Fixed bug #78454 (Consecutive numeric separators cause OOM error).
13
+ (Theodore Brown)
12
14
13
15
- SPL:
14
16
. Fixed bug #78436 (Missing addref in SplPriorityQueue EXTR_BOTH mode).
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Invalid consecutive numeric separators after hex literal
3
+ --FILE--
4
+ <?php
5
+ 0x0 __F;
6
+ --EXPECTF --
7
+ Parse error: syntax error, unexpected '__F ' (T_STRING ) in %s on line %d
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Invalid consecutive numeric separators after binary literal
3
+ --FILE--
4
+ <?php
5
+ 0b0 __1
6
+ --EXPECTF --
7
+ Parse error: syntax error, unexpected '__1 ' (T_STRING ) in %s on line %d
Original file line number Diff line number Diff line change @@ -1775,7 +1775,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
1775
1775
char *end, *bin = yytext + 2 ;
1776
1776
1777
1777
/* Skip any leading 0s */
1778
- while (*bin == ' 0' || *bin == ' _' ) {
1778
+ while (len > 0 && ( *bin == ' 0' || *bin == ' _' ) ) {
1779
1779
++bin;
1780
1780
--len;
1781
1781
}
@@ -1892,7 +1892,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
1892
1892
char *end, *hex = yytext + 2 ;
1893
1893
1894
1894
/* Skip any leading 0s */
1895
- while (*hex == ' 0' || *hex == ' _' ) {
1895
+ while (len > 0 && ( *hex == ' 0' || *hex == ' _' ) ) {
1896
1896
++hex;
1897
1897
--len;
1898
1898
}
You can’t perform that action at this time.
0 commit comments