Great writeup – I appreciate how accessible it is.
It’s more like an “buffer underflow” 🙂 good find and write-up!
Thing I’m most surprised about is how you wouldn’t end up hitting a maximum length pretty early on. Very interesting class of bugs though
Sounds a lot like Heart Bleed: https://en.m.wikipedia.org/wiki/Heartbleed