|
|||||||||||
|
MSIE integer overflows
From: Berend-Jan Wever <SkyLined(at)edup.tudelft.nl>
Date: Sun May 11 2003 - 17:03:34 EDT
A few examples of buggy jscript:
var i = 32*256*256 * 256*256*256*256-1;
document.write((i==++i) + ' ' + (i==++i) + '<BR>');
prints:
But array functions run into problems around 32 bits:
var i = 128*256*256*256-3;
document.write(a.push('a')+'prints: 2147483647 -2147483648 -2147483647 undefined b a I've been trying to think where I can find an integer that will cause troubles if it overflows, but I have not found anything... anybody got any idears ? Cheers,
Berend-Jan Wever
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:39 EDT |
||||||||||
|
|||||||||||