News for hackers. Stuff that matters.
Re:Did Ken, Ritchie and Brian choose wrong with NUL-terminat... by tptacek on Tuesday January 16, 2018 @02:17PM (#16161287)
Two bottles of beer on the wall, two bottles of beer.

Take one down, pass it around, one bottle of beer on the wall.

One bottle of beer on the wall, one bottle of beer.

Take it down, pass it around, zero bottles of beer on the wall.

Zero bottles of beer on the wall, zero bottles of beer.

Take one down, pass it around, four billion, two hundred ninety-four million, nine hundred sixty-seven thousand, two hundred ninety-five bottles of beer on the wall.

(Yes, you pretty much have it in your question; the Google search you want to make to learn more is [integer overflow]).

Re:Did Ken, Ritchie and Brian choose wrong with NUL-terminat... by zerokernel on Tuesday January 16, 2018 @02:23PM (#16161346)
And various undefined behaviours (signed overflow etc.) colluding against the programmer to the effect that compilers sometimes delete range-checking code.

Integer promotion rules are not simple, either. Integer width rules, far from simple.