4 ms·
All the string functions have buffer overrun vulnerabilities if not used carefully. I'm not sure about the time functions though.
by alexchamberlain 6y ago
All the string functions have buffer overrun vulnerabilities if not used carefully. I'm not sure about the time functions though.
- edflsafoiewq 6y agoThe time functions are either non-reentrant, or, for the _r versions, have the same problem with buffer overruns. https://github.com/git/git/commit/1fbfdf556f2abc708183caca53ae4e2881b46ae2 https://github.com/git/git/commit/1fbfdf556f2abc708183caca53... https://github.com/git/git/commit/91aef030152d121f6b4bc3b933c696073ba073e2 https://github.com/git/git/commit/91aef030152d121f6b4bc3b933...
- trilinearnz 6y agoVery much this. I frequently write small games in C, and the number of times I have been bitten by baffling behaviour because a string somewhere was copied into an array that was too short, are many! Apart from that, I love the simplicity of the language and the stdlib, and it's definitely my preferred hobby programming environment. It would be good to know what the commonly-accepted alternatives are.