Skip to content

Commit

Permalink
Fix stack overflow if interpreting a file full of '{' (fix #1448)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed May 28, 2018
1 parent ca13e4d commit 51380ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Add for(var i of array) to iterate over elements
Added getter and setter support
Stop parsing blocks if not executing (fix #572)
Fix stack overflow if interpreting a file full of '{' (fix #1448)

1v99 : Increase jslMatch error buffer size to handle "UNFINISHED TEMPLATE LITERAL" string (#1426)
nRF5x: Make FlashWrite cope with flash writes > 4k
Expand Down
1 change: 1 addition & 0 deletions src/jsparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -2720,6 +2720,7 @@ NO_INLINE JsVar *jspeStatement() {
return jspeExpression();
} else if (lex->tk=='{') {
/* A block of code */
if (!jspCheckStackPosition()) return 0;
jspeBlock();
return 0;
} else if (lex->tk==';') {
Expand Down

0 comments on commit 51380ba

Please sign in to comment.