http://bugs.winehq.org/show_bug.cgi?id=19759
--- Comment #9 from Sunil Mohan Adapa sunilmohan@fsf.org.in 2009-08-18 00:29:29 --- (In reply to comment #7) [...]
While perhaps the buffer isn't guaranteed to be set entirely to be zero, there is one test at least that checks that an empty string (length 0) has a NULL terminator in it [1].
This test case should shield our assumption.
[...]
In summary, I'd suggest you keep the first change but omit the second: the second really does seem superfluous, and while in principle it can't hurt, it might raise objections that would keep your patch out longer than necessary.
[...]
(In reply to comment #8)
And the more direct answer: yes, do. See my rather wordy last comment for my justification ;-)
Thank you Juan, I have now posted a patch that only includes the length correction and does not set NULL terminators.