Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The opportunity for off-by-one errors is at the other end of the pipe, when you grab data from that same buffer and munch it in the application. Depending on how unlucky you are, that ends up involving crap like CRs and LFs and totally sane protocols that include the header length in the byte count for some packets, but not for other packets.

It's probably not the best of examples, but the mistakes pop up the same way as for dynamically-allocated buffers -- you pick the wrong offset or count up to the wrong limit, and it doesn't make much of a difference if the buffer was statically allocated or not.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: