News for hackers. Stuff that matters.
Re:Stop using strncpy already by dchichkov on Thursday April 04, 2013 @05:08AM (#5491666)
>> Then strncpy() will happily 0-fill all of that buffer space

Yes. And that feels like a really poor choice of the function name in my opinion. It should have been strcpy_pad_with_zeros() rather than strncpy(). To reflect the fact that it is going to waste precious cache lines and memory writes.

Re:Stop using strncpy already by makomk on Thursday April 04, 2013 @05:41AM (#5491737)
It probably made sense in an era when typing was slow and fixed-length records padded with zeroes were common.
Re:Stop using strncpy already by dibbit on Thursday April 04, 2013 @07:37AM (#5492051)
It made sense when portability from C to C++ was important, as in now and for as long as both languages have constancy.