#8481: strncpy doesn't pad the destination string with NULs ---------------------------------+---------------------------- Reporter: hamish | Owner: axeld Type: bug | Status: new Priority: normal | Milestone: R1 Component: System/libroot.so | Version: R1/Development Resolution: | Keywords: strncpy Blocked By: | Blocking: Has a Patch: 1 | Platform: All ---------------------------------+---------------------------- Comment (by hamish): Replying to [comment:8 tqh]: > Interesting probably hard to do better, maybe align writes on four bytes to ease up on the write combining. Yep, I'm already aligning the destination buffer. > Btw I've been looking at {{{-D__NO_STRING_INLINES}}} as a build parameter, which from what I can tell, tells gcc to not trust glib with inlining but do it in gcc. This might be the wrong assumption though as it is very poorly documented. As far as I can tell that only affects whether glibc's string.h defines a bunch of inline assembly versions of the string functions. Since we don't use glibc's string.h I don't think it has any effect. -- Ticket URL: <http://dev.haiku-os.org/ticket/8481#comment:9> Haiku <http://dev.haiku-os.org> Haiku - the operating system.