forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check recursion in JSParserImpl::parseBindingElement
Summary: This additional recursion check avoids a crash on: var v2 = "[".repeat(100000); var v5 = Function(v2,"return 0"); Reviewed By: tmikov Differential Revision: D24060561 fbshipit-source-id: 8f7d81b81d68b5c729338e6a39f103a3e4d1c3f2
- Loading branch information
1 parent
11a30af
commit 551de84
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
// RUN: ( ! %hermes %s 2>&1 ) | %FileCheck --match-full-lines %s | ||
|
||
var v2 = "[".repeat(100000); | ||
// CHECK: {{.*}}Too many nested expressions/statements/declarations{{.*}} | ||
var v5 = Function(v2,"return 0"); |