HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by ape4 | Hacker News Reader
Full thread
ape4
·
Just replace strcpy(a,b) with strcpyn(a,b,INT_MAX)
/joke
View on HN
fatnoah
·
I'm pretty sure I've seen similar logic in my life.
beeforpork
·
Been a while, eh?
It should be strncpy(a,b,(size_t)-1)!
guerrilla
·
SIZE_MAX does exist.
Reply on news.ycombinator.com