From: Alan Jenkins Date: Tue, 21 Oct 2008 21:42:15 +0000 (+0100) Subject: replace strncpy() with strlcpy() X-Git-Tag: 174~1403 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=111e4f81ff057fd5869d152a503ad982e2116f85;hp=111e4f81ff057fd5869d152a503ad982e2116f85 replace strncpy() with strlcpy() 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 ---