[quickjs-devel] utf-16 handling causing heap-buffer-overflow

  • From: Liew Darren <ldarren@xxxxxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx
  • Date: Wed, 20 May 2020 17:32:30 +0800

the following code is causing heap-buffer-overflow exception

function* invalidControls() {
  for (alpha = 1072; alpha <= 1103; alpha++) {
    yield String.fromCharCode(alpha);
  }
}
for (let letter of invalidControls()) {
  var source = '\\c' + letter;
  char = source.startsWith(source, 100);
}

same code run in browser doesn't cause exception.
details report can be found here
https://github.com/ldarren/QuickJS/issues/10

Thanks for your attention

-- 
Best regards,
Darren Liew

Other related posts: