From 12b248aa6632e9759f368f0f268fd7a6246ba81d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 14 Jan 2009 06:13:54 +0000 Subject: [PATCH] doxygen: Added comments in checkbufferoverrun.h --- src/checkbufferoverrun.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/checkbufferoverrun.h b/src/checkbufferoverrun.h index 21806f8fd..0bf4f2fb6 100644 --- a/src/checkbufferoverrun.h +++ b/src/checkbufferoverrun.h @@ -31,21 +31,30 @@ public: CheckBufferOverrunClass(const Tokenizer *tokenizer, const Settings &settings, ErrorLogger *errorLogger); ~CheckBufferOverrunClass(); - // Buffer overrun.. + /** Check for buffer overruns */ void bufferOverrun(); - - // Dangerous functions that can cause buffer overruns + /** Check that the code doesn't use dangerous functions that can cause buffer overruns (scanf and gets) */ void dangerousFunctions(); private: + + /** Check for buffer overruns - locate struct variables and check them with the .._CheckScope function */ void CheckBufferOverrun_StructVariable(); + + /** Check for buffer overruns - locate local function variables and check them with the .._CheckScope function */ void CheckBufferOverrun_LocalVariable(); + + /** Check for buffer overruns - this is the function that performs the actual checking */ void CheckBufferOverrun_CheckScope(const Token *tok, const char *varname[], const int size, const int total_size, unsigned int varid); + + /** Report error using the callstack */ void ReportError(const std::string &errmsg); const Tokenizer *_tokenizer; const Settings _settings; ErrorLogger *_errorLogger; + + /** callstack - used during intra-function checking */ std::list _callStack; };