var array = eval(buffer);
alert(array.length); // would be 65536, // if it got this far..

The code produces an out of memory error on the eval statement. The limit for eval appears to be 65,535 – a number that harkens back to the dark, dismal days of programming in a segmented memory architecture.