The Old New Thing

It is not unreasonable to expect uninitialized garbage to change at any time, you don't need to ask for an explanation

A customer admitted that they had a bug in their code: One bug in the above code is in the final parameter passed to : It's supposed to be the count in bytes, but the calculation appends only one byte for the terminating null instead of a full . In other words, it should be For concreteness, let's say the original string was five s in ...