News for hackers. Stuff that matters.
Re:Asmttpd – Web server for Linux written in amd64 assembly by TheLoneWolfling on Wednesday May 20, 2015 @11:11AM (#9576832)
I should have specified a little more, perhaps. Don't think of it as a null-terminated + length-prefixed string. It's effectively a purely length-prefixed string. There just happens to always be a null one byte after the end of the string.

The length prefix is the only thing you use, ordinarily. The only time the null comes into play is if you've already had a bug.

Think of it like a stack protector.

Re:Asmttpd – Web server for Linux written in amd64 assembly by KMag on Monday May 25, 2015 @08:28PM (#9602327)
> Think of it like a stack protector.

... but one that doesn't terminate execution, but instead hides your bugs. In most use cases, I'd prefer to find my bugs in the majority of cases, rather than to hide the bugs except for corner cases.