Messages in this thread | | | Subject | Re: Minor bug in lib/string.c | Date | Sat, 29 May 1999 02:13:28 +0100 (BST) | From | Alan Cox <> |
| |
> 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.
The kernel functions aren't always quite ANSI. Speed first in the kernel case.
- 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/
| |