C、C++、Perl、Python、PHPで記述されたソースファイルをスキャンし、既知のセキュリティの欠陥を発見するソフト。GPL。
最近ちょこっと書いたコードに適用してみたらswprintfに関する警告が出てしまいました。
$ rats --resultsonly --columns *.cpp hoge.cpp:100[11]: High: swprintf Check to be sure that the non-constant format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle. --- hoge.cpp:100[11]: High: swprintf Check to be sure that the format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle. Additionally, the format string could contain `%s' without precision that could result in a buffer overflow.
Hello! Good Site! Thanks you! affrgedqvewe