News for hackers. Stuff that matters.
Re:Further hardening glibc malloc() against single byte over... by Eridrus on Thursday May 18, 2017 @10:39AM (#14367564)
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.
Re:Further hardening glibc malloc() against single byte over... by mikeash on Thursday May 18, 2017 @10:56AM (#14367739)
Sweet Jesus. I could almost understand it if they allocated an extra byte and then used an offset base pointer....