Menu

Linux Finally Eliminates The strncpy API After Six Years Of Work, 360+ Patches
🖼️

Linux Finally Eliminates The strncpy API After Six Years Of Work, 360+ Patches

Hacker News·4 months ago
#PTgtGWuf
#phoronix#strncpy#linux#kernel#eliminated
Reading 0:00
15s threshold

Linux 7.2 has finally eliminated the strncpy API from the Linux kernel. The strncpy() function for copying up to a specified number of bytes has long been deprecated and after six years of work and hundreds of patches, no more users of the strncpy interface within the Linux kernel remained that it has now been eliminated.

The strncpy function within the Linux kernel has been a "persistent source of bugs" for years due to counter-intuitive semantics and behavior around NUL termination along with performance issues due to redundant zero-filling of the destination.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.