Git's list of banned C functions
github.com
Git's list of banned C functions
1–10 of 639 posts
Re: Git's list of banned C functions
#2What would be helpful is an explanation of how each function ends up being misused so people can learn from this.
Re: Git's list of banned C functions
#3Are there some details on whats wrong with these?
Re: Git's list of banned C functions
#4Ah this is a very good idea. I guess you still have to make sure that all your translation units include this header, which isn't completely foolproof.
Static analysis would probably be more robust, but way more involved.
Re: Git's list of banned C functions
#5Are there some details on whats wrong with these?
The commit messages that added them explain the reasoning
Re: Git's list of banned C functions
#6It would be nice if the error messages generated would suggest replacement functions that they deem appropriate. I see that I'm not supposed to use gmtime, localtime, ctime, ctime_r, asctime, and asctime_r; but what do they think I should use?
Re: Git's list of banned C functions
#7Are there some details on whats wrong with these?
All the string functions have buffer overrun vulnerabilities if not used carefully. I'm not sure about the time functions though.
Re: Git's list of banned C functions
#8What would be helpful is an explanation of how each function ends up being misused so people can learn from this.
Git blame is helpful here. See e.g.https://github.com/git/git/commit/1b11b64b815db62f93a04242e4...
Re: Git's list of banned C functions
#9What would be helpful is an explanation of how each function ends up being misused so people can learn from this.
View the git history for the file. Each commit that adds functions has a detailed explanation of what is wrong with the functions.
Re: Git's list of banned C functions
#10Are there some details on whats wrong with these?
[deleted]