Re:Banned C standard library functions in Git source code
by jpjuni0r on Sunday August 25, 2019 @12:51PM
(#20793956)
I'm curious how sscanf is considered bad?
[ Parent
| on HN ]
Re:Banned C standard library functions in Git source code
by saagarjha on Sunday August 25, 2019 @01:46PM
(#20794336)
scanf(“%s”, …) can cause a buffer overflow.
Re:Banned C standard library functions in Git source code
by mort96 on Sunday August 25, 2019 @03:00PM
(#20794792)
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.