Re:Improvements to static analysis in GCC 14
by kevin_thibedeau on Wednesday April 03, 2024 @09:10PM
(#39925420)
strncpy() also zero pads the entire buffer. If it's significantly larger than the copied string you're wasting cycles on pointless move operations for normal, low-security string handling. This behavior is for filling in fixed length fields in data structures. It isn't suitable for general purpose string processing.
[ Parent
| on HN ]
There are no comments on this comment yet.