Y
Hacker News
new
|
ask
|
show
|
jobs
by
jpjuni0r
2485 days ago
I'm curious how sscanf is considered bad?
1 comments
saagarjha
2485 days ago
scanf(ā%sā, ā¦) can cause a buffer overflow.
link
mort96
2485 days ago
It sucks that there's no scanf("%.*s"), where you give the buffer length as a separate argument. The fact that it's in a string literal also makes using a compile-time constant really ugly.
link
claystu
2485 days ago
You can overflow buffers all sorts of ways in C.
link