3 ms·
A misname that may have cost cost billions in bugs and security issues.
by heisenbit 8y ago
A misname that may have cost cost billions in bugs and security issues.
- burfog 8y agoIt has also avoided security issues, some of which get created when people get the idea that every strncpy must be replaced by strlcpy. The strncpy function writes to the entire buffer. This is important if you will be passing the buffer across a security boundary, for example in a network packet or as a struct copied into a publicly visible file. If trailing bytes are not cleared, then secret data (which happened to be sitting in memory) can get leaked.