News for hackers. Stuff that matters.
Re:Some Were Meant for C (2017) [pdf] by leetcrew on Thursday April 25, 2019 @08:39PM (#19753861)
> OTOH, if an incoming string doesn't have a NUL byte your program will crash/corrupt memory/worse.

how are linked lists different? if the last node contains garbage for its next pointer, the outcome will be exactly the same. it's a bit more rare to encounter an "unterminated" linked list, but I've seen it happen plenty of times deserializing a linked list from disk or if the programmer just forgot to initialize the pointer. c strings basically are linked lists with an implicit next pointer.

There are no comments on this comment yet.