Improve graph edge resolution code.

This is a follow-up to ca7ecd37c94e268972697a37eec4e46771c6e6f2 further improving the DiD resolution for CVE-2018-12386.
This commit is contained in:
wolfbeast 2018-10-23 09:44:24 +02:00 • committed by Roy Tam
commit f592b614d0
4 changed files with 48 additions and 17 deletions

View file

@ -0,0 +1,17 @@
function f() {
var objs = [];
for (var i = 0; i < 100; i++) {
objs[i] = {};
}
var o = objs[0];
var a = new Float64Array(1024);
function g(a, b) {
let p = b;
for (; p.x < 0; p = p.x) {
while (p === p) {}
}
for (var i = 0; i < 10000; ++i) {}
}
g(a, o);
}
f();

View file

@ -0,0 +1,7 @@
function f(a, b) {
for (; b.x < 0; b = b.x) {
while (b === b) {};
}
for (var i = 0; i < 99999; ++i) {}
}
f(0, 0);