logoalt Hacker News

GabrielTFStoday at 11:53 AM0 repliesview on HN

The issue with strncpy is that it doesn't actually necessarily terminate - in fact in any case where the source is larger than the destination it will just leave it unterminated (like, it will copy the last character it can from the source instead of terminating the destination string with a NUL)