Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Using strncpy is not a remedy at all. The function was never designed for safe string copying, but for copying fixed-width inode names[1]. The fact that is protects against buffer overflows is pure coincidence.

[1]: http://stackoverflow.com/a/1454071





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: