5 ms·
http://en.wikipedia.org/wiki/Integer_overflow http://en.wikipedia.org/wiki/Integer_overflow
by graywh 16y ago
http://en.wikipedia.org/wiki/Integer_overflow http://en.wikipedia.org/wiki/Integer_overflow
- RiderOfGiraffes 16y agoNope - not integer overflow. (OK, yes, for exceedingly large inputs there are issues about sizes of integers, etc., but that's not the bug. It's much, much simpler.)
- deleted 16y ago[deleted]
- deleted 16y ago[deleted]
- what 16y agoI quickly realized my mistake, but apparently couldn't delete fast enough. Need more coffee.
- JoachimSchipper 16y agoUnless I'm sorely mistaken, there's no integer overflow in the program as published. (You could cause an overflow in test() by calling it with a very long output argument, but it's much simpler to cause a buffer overflow, so why bother?)