2 ms·
An unchecked "sprintf" is a potential buffer overflow, especially in something like this where the input and output string buffers are parameters to the functio
by Animats 11y ago
An unchecked "sprintf" is a potential buffer overflow, especially in something like this where the input and output string buffers are parameters to the function.
I didn't even go looking for bad code. I was just curious to see what language they were using. This was near the top of the first file I looked at.
The code looks like C code circa 1990. If a first glance turned up this, what else bad is in there?
- ArkyBeagle 11y agoWhether this is bad in practice depends. It is declared static, so it's just a small helper function, not a major API entry point. In a review, I'd call out requirements for buffer overflow detection outside this function.