mazu-editor
mazu-editor copied to clipboard
Perform static analysis for potential weakness
I've tried to use cpplint(just copy the cpplint.py and it often workable).
The CPPLINT.cfg which fit for current coding style as
filter=-legal/copyright,-whitespace/comments,-readability/multiline_comment,-whitespace/braces,-readability/braces
linelength=132
The output of cpplint.py me.c
me.c:514: Almost always, snprintf is better than strcpy [runtime/printf] [4]
me.c:778: Consider using localtime_r(...) instead of localtime(...) for improved thread safety. [runtime/threadsafe_fn] [2]
In formal secure coding, strcpy is not suggest to use anymore.
cppcheck is another tool to be investigated.