DigiNews

Tech Watch by Johan Denoyer

← Back to articles

Linux Kills Strncpy

Quality: 7/10 Relevance: 8/10

Summary

Stephen Smith’s blog post argues that strncpy is a source of security issues in C, particularly within the Linux kernel, and describes how the kernel moved away from strncpy to safer alternatives. It explains the historical problems with strcpy/strncpy, the six-year, 360-patch effort to remove strnpy, and introduces safer functions like strscpy and strscpy_pad, along with guidance on when to use each helper to maintain termination, avoid padding pitfalls, and improve correctness.

🚀 Service construit par Johan Denoyer