Hot answers tagged dangling-pointer
9
I don't code for gcc, so hopefully someone else can add to this, or correct me. I'll edit it with responses. Some of these will not work for all circumstances.
-Wall -Wextra -Wconversion -Wformatsecurity Turn on all warnings to help ensure the underlying code is secure.
-Werror Turns all warnings into errors so you can't ignore them.
-arch x86_64 ...
3
Those are good options, but you need to pay attention to your own source code.
Make sure to use secure function when dealing with user inputs, filter them and when you use something like strncpy(), try not to give a lot of space to prevent certain attacks.
OS itself provides security i.e. DEP (NX), ASLR and canaries to protect the stack, but you can't rely ...
Only top voted, non community-wiki answers of a minimum length are eligible