3 ms·
One of the funniest things I've seen in code I saw in PHP core a decade ago; they had a buffer underflow where they would overwrite arr[-1] with some character.
by Eridrus 9y ago
One of the funniest things I've seen in code I saw in PHP core a decade ago; they had a buffer underflow where they would overwrite arr[-1] with some character. Their solution was to save the contents of arr[-1] before the loop, then restore it afterwards.
- mikeash 9y agoSweet Jesus. I could almost understand it if they allocated an extra byte and then used an offset base pointer....