Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
utborin
on March 4, 2021
|
parent
|
context
|
favorite
| on:
Git's list of banned C functions
There's that, but with sprintf/vsprintf specifically, there's no way to keep it from storing characters past the end of your buffer. For example:
char buf[2]; sprintf(buf, "%d", n);
This will happily write to buf[2] and beyond if n is negative or greater than 9.
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: