Re:Stop using strncpy already (2013)
by IChooseYou on Friday August 31, 2018 @10:53AM
(#17886041)
Also Microsoft's strncpy_s has been around forever.
[ Parent
| on HN ]
But Microsoft's strncpy_s is unsafe.
My safeclib also had the unsafe versions behind the non-default ./configure --enable-unsafe switch.
But this year I decided to make them safe instead. In this case the spec is broken.
Re:Stop using strncpy already (2013)
by brucedawson on Friday August 31, 2018 @11:25AM
(#17886308)
It's too bad strncpy_s is so unwieldy to use. Having to pass the TRUNCATE flag is frustrating. I really want a two argument (dst, src) function that guarantees null termination.