-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CVE-2017-11811] Disable switch jump table opt if aggressive int type…
… spec is disabled. We are not able to handle a non-int-type-specialized index operand on a switch table branch (today, it will cause us to read the wrong jump target and possibly read past the end of the jump table). Another option is to force type specialization of the index operand, but this seems not worth the risk as a servicing fix.
- Loading branch information
1 parent
a9ea5c9
commit 775ed51
Showing
3 changed files
with
53 additions
and
1 deletion.
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,41 @@ | ||
function opt() { | ||
for (let i = 0; i < 100; i++) { | ||
let j = i - 2; | ||
switch (i) { | ||
case 2: | ||
case 4: | ||
case 6: | ||
case 8: | ||
case 10: | ||
case 12: | ||
case 14: | ||
case 16: | ||
case 18: | ||
case 20: | ||
case 22: | ||
case 24: | ||
case 26: | ||
case 28: | ||
case 30: | ||
case 32: | ||
case 34: | ||
case 36: | ||
case 38: | ||
break; | ||
} | ||
|
||
if (i == 90) { | ||
i = 'x'; | ||
} | ||
} | ||
} | ||
|
||
function main() { | ||
for (let i = 0; i < 100; i++) { | ||
opt(); | ||
} | ||
} | ||
|
||
main(); | ||
|
||
WScript.Echo('pass'); |
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