lkml.org 
[lkml]   [1999]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Minor bug in lib/string.c
Date
>
> Hi,
>
> I didn't know were else to send this. The Linux docs say if I'm total
> clueless, send it here. :)
>
> I found a minor bug in lib/string.c, in the strncpy() function. These
> two lines need to be added after the first while loop.
>
> while(count--)
> *dest++ = '\0';
>
> ANSI says strncpy() needs to have the destination string null padded
> to 'count' bytes if the source string has ended.
>
> Brad Proctor
>
> --
> Email: <fredie@sprynet.com>
> Home Page: "http://members.xoom.com/fredlie/"

I don't think anyone really cares. The kernel isn't ANSI, and padding the
string
would just slow down the function.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [from the cache]
©2003-2011 Jasper Spaans