chiark / gitweb /
replace strncpy() with strlcpy()
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Tue, 21 Oct 2008 21:42:15 +0000 (22:42 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Tue, 21 Oct 2008 21:55:13 +0000 (23:55 +0200)
The problem was strncpy() doesn't stop after writing the terminating
NUL; by definition it goes on to zero the entire buffer.

I spy another use of strncpy in udev_device_add_property_from_string(),
which is responsible for another ~1% user cpu time...

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>

No differences found