News for hackers. Stuff that matters.
Re:Beware of strncpy and strncat by masklinn on Wednesday June 06, 2018 @12:26PM (#17248474)
Can't you just strncpy sizeof(dest) if you're going to zero-out the last byte of the buffer unconditionally?
Re:Beware of strncpy and strncat by loeg on Wednesday June 06, 2018 @04:05PM (#17250598)
Yeah. You've "wasted" an extra byte copy, but that is usually so cheap as to be virtually free.