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

Oops, yes, I forgot to add the "-1" to the end of that. The blog post has the right invariant:

> this function will copy the smaller of strlen(src) or len - 1 bytes from src to dst



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

Search: