[lkml]   [2003]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: generic strncpy - off-by-one error
On Wed, 2003-08-13 at 00:24, Bernd Petrovitsch wrote:

>I don't see any problem with this code, and if we don't need to
>NULL-pad the dest string, we do not have to. It is not in the
>definition of strncpy().



Thanks for pointing that out to me. However, I don't think the kernel
strncpy implementation is exactly the same as that of Standard C lib
implementation. Iwas just looking at it from the kernel code context.
There's a point in doing it the "kernel" way, to save precious CPU
cycles from being wasted otherwise.

Anthony Dominic Truong.

Disclaimer: The information contained in this transmission, including any
attachments, may contain confidential information of Matsushita Avionics
Systems Corporation. This transmission is intended only for the use of the
addressee(s) listed above. Unauthorized review, dissemination or other use
of the information contained in this transmission is strictly prohibited.
If you have received this transmission in error or have reason to believe
you are not authorized to receive it, please notify the sender by return
email and promptly delete the transmission.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.041 / U:28.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site