Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
jpjuni0r
· 7y ago · 0 comments
I'm curious how sscanf is considered bad?
Comments
[–]
saagarjha
7y ago
scanf(“%s”, …) can cause a buffer overflow.
[–]
mort96
7y 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.
[–]
claystu
7y ago
You can overflow buffers all sorts of ways in C.