HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by saagarjha | Hacker News Reader
Parent
Full thread
saagarjha
·
scanf(“%s”, …) can cause a buffer overflow.
View on HN
mort96
·
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
·
You can overflow buffers all sorts of ways in C.
Reply on news.ycombinator.com