Jeff Garzik wrote:
On 09/10/2010 08:55 AM, Jim Meyering wrote:
* server/msg.c (msg_get): Copy only name_len bytes, then NUL-terminate,
rather than using snprintf to copy up to and including nonexistent NUL.
---
valgrind exposed this. The use of snprintf would have been
correct if the
On 09/10/2010 08:55 AM, Jim Meyering wrote:
* server/msg.c (msg_get): Copy only name_len bytes, then NUL-terminate,
rather than using snprintf to copy up to and including nonexistent NUL.
---
valgrind exposed this. The use of snprintf would have been
correct if the inode name buffer
The thing is, snprintf always NULL-terminates its output string, no
matter whether the input was NULL-terminated or not.
However, I looked at the snprintf man page again and found this
description for %s :
If no l modifier is present: The const char * argument is expected to be
a pointer to