Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ape4
on March 4, 2021
|
parent
|
context
|
favorite
| on:
Git's list of banned C functions
Just replace strcpy(a,b) with strcpyn(a,b,INT_MAX)
/joke
fatnoah
on March 4, 2021
|
next
[–]
I'm pretty sure I've seen similar logic in my life.
beeforpork
on March 4, 2021
|
prev
[–]
Been a while, eh?
It should be strncpy(a,b,(size_t)-1)!
guerrilla
on March 5, 2021
|
parent
[–]
SIZE_MAX does exist.
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
/joke