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

No, you should NOT use strncpy instead. It can create broken strings that are not NULL terminated.

I would suggest using strlcpy.



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

Search: