Sreekanth, > I verified strscpy() is not adding any null terminator when source > string length is greater than destination buffer size. That's odd. The point of strscpy() is that it guarantees termination: ---8<--- /** * strscpy - Copy a C-string into a sized buffer * @dest: Where to copy the string to * @src: Where to copy the string from * @count: Size of destination buffer * * Copy the string, or as much of it as fits, into the dest buffer. The * behavior is undefined if the string buffers overlap. The destination * buffer is always NUL terminated, unless it's zero-sized. ---8<--- I tested it and it works fine for me. -- Martin K. Petersen Oracle Linux Engineering