cppcheck/lib
Heinrich Schuchardt bd67db96f1 5505: FP: Array accessed out of bounds
CheckBufferOverrun::checkFunctionParameter alreacy considered usage of a
function parameter inside an if block as a special case.

With the patch the same is done for switch statements.

A test is added.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2014-03-07 19:51:13 +01:00
..
check.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
check64bit.cpp Check64Bit: Fixed false positive about returning integer for 'p+(n*80)' 2013-10-08 06:36:45 +02:00
check64bit.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
checkassert.cpp Fixed #4937 (false positive: Assert calls a function which may have desired side effects) 2013-08-22 06:38:54 +02:00
checkassert.h Fixed #5303 (Possible NULL pointer dereference in checkassert.cpp) 2014-01-03 09:32:05 +01:00
checkassignif.cpp AST: Always use AST 2013-12-09 18:06:19 +01:00
checkassignif.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
checkautovariables.cpp Fixed #5005 (false positive: (warning) Assignment of function parameter has no effect outside the function.) 2013-10-06 16:07:27 +02:00
checkautovariables.h Fixed #5290 (Doxygen fixes (32be409)) 2014-01-01 20:46:00 +01:00
checkbool.cpp pointerArithBool: Updated error message 2013-12-25 19:56:00 +01:00
checkbool.h Fixed #5126 (new check: missing pointer dereference or pointer overflow 'if (p+1)') 2013-12-23 18:39:05 +01:00
checkboost.cpp
checkboost.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
checkbufferoverrun.cpp 5505: FP: Array accessed out of bounds 2014-03-07 19:51:13 +01:00
checkbufferoverrun.h Cleanup ExecutionPath from CheckBufferOverrun 2014-01-22 21:25:37 +01:00
checkclass.cpp Refactor checks using Variable::isStlType() 2014-01-30 01:26:48 -03:00
checkclass.h Fixed #5116 (false positive: memset on class (nested struct)) 2013-11-18 16:56:00 +01:00
checkexceptionsafety.cpp
checkexceptionsafety.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
checkinternal.cpp Fixed Visual Studio compiler error 2014-01-06 18:14:29 +01:00
checkinternal.h CheckInternal: Improved checking of multiCompare patterns 2014-01-05 21:15:41 +01:00
checkio.cpp Refactor checks using Variable::isStlType() 2014-01-30 01:26:48 -03:00
checkio.h Fixed #5134 (Memory leak below CheckIO::checkWrongPrintfScanfArguments()) 2013-11-01 05:42:37 +01:00
checkleakautovar.cpp astyle formatting 2013-07-28 11:53:49 +02:00
checkleakautovar.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
checkmemoryleak.cpp Merge pull request #226 from scriptum/rpg-fix-function-parameter 2014-01-28 20:32:56 -08:00
checkmemoryleak.h CheckMemoryLeak: Move posix-opendir/closedir to library 2014-01-26 17:02:36 +01:00
checknonreentrantfunctions.cpp
checknonreentrantfunctions.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
checknullpointer.cpp Refactor checks using Variable::isStlType() 2014-01-30 01:26:48 -03:00
checknullpointer.h Remove ExecutionPath from CheckNullPointer 2014-01-22 20:24:51 +01:00
checkobsoletefunctions.cpp
checkobsoletefunctions.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
checkother.cpp Refactor checks using Variable::isStlType() 2014-01-30 01:26:48 -03:00
checkother.h CheckOther: Removed non-valueflow check for division by possible zero before condition 2014-01-17 17:42:54 +01:00
checkpostfixoperator.cpp
checkpostfixoperator.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
checksizeof.cpp clarify calculation: Fixed FP for 'a = (*p ? 1 : 2)' 2013-12-28 11:02:39 +01:00
checksizeof.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
checkstl.cpp Fixed #4938: (.empty() method false positive for non-STL classes) 2014-01-30 18:09:24 -03:00
checkstl.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
checkuninitvar.cpp Fixed #5245 (false positive: Uninitialized variable (assignment inside ternary operator)) 2014-01-25 10:12:50 +01:00
checkuninitvar.h Uninitialized variables: check function arguments 2013-12-09 15:58:42 +01:00
checkunusedfunctions.cpp astyle formatting 2014-01-02 21:47:35 +01:00
checkunusedfunctions.h Fixed #5290 (Doxygen fixes (32be409)) 2014-01-01 20:46:00 +01:00
checkunusedvar.cpp Refactor checks using Variable::isStlType() 2014-01-30 01:26:48 -03:00
checkunusedvar.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
config.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
cppcheck.cpp Set version to "1.64 dev"/1.63.99. Use version.h in cppcheck.cpp. 2014-01-04 10:41:13 +01:00
cppcheck.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
cppcheck.vcxproj value flow: Updated Visual Studio files 2014-01-05 09:52:37 +01:00
cppcheck.vcxproj.filters value flow: Updated Visual Studio files 2014-01-05 09:52:37 +01:00
errorlogger.cpp Use TinyXML to write XML files 2013-08-07 16:30:55 +02:00
errorlogger.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
executionpath.cpp
executionpath.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
lib.pri Add new experimental value flow analysis 2014-01-04 20:57:02 +01:00
library.cpp Moved several hardcoded function names in format string checking into libraries (std.cfg and windows.cfg). 2014-01-12 03:44:24 -08:00
library.h Moved several hardcoded function names in format string checking into libraries (std.cfg and windows.cfg). 2014-01-12 03:44:24 -08:00
mathlib.cpp Fixed typos in comments, no functional changes. 2013-11-09 16:07:28 +01:00
mathlib.h Fixed linker problems in mathlib 2013-10-01 20:40:55 +02:00
path.cpp Fix case-insensitive string compare function on MinGW 2014-01-17 15:29:53 -06:00
path.h Refactoring FileLister and Path so they don't depend on Library 2013-10-31 19:09:01 +01:00
pcrerules.pri
preprocessor.cpp Fixed #5340 (Preprocessor: not using errorLogger when reporting syntax errors) 2014-01-12 13:15:54 +01:00
preprocessor.h Fixed #5119 (Preprocessor: Using -D suppresses __cplusplus for C++ files) 2013-11-15 19:21:21 +01:00
settings.cpp Removed the --value-flow flag. ValueFlow analysis will always be enabled from now on. 2014-01-17 18:07:05 +01:00
settings.h Removed the --value-flow flag. ValueFlow analysis will always be enabled from now on. 2014-01-17 18:07:05 +01:00
standards.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
suppressions.cpp
suppressions.h Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
symboldatabase.cpp Add Variable::isStlType function 2014-01-28 11:44:56 -03:00
symboldatabase.h Refactor checks using Variable::isStlType() 2014-01-30 01:26:48 -03:00
templatesimplifier.cpp Fixed #5097 (TemplateSimplifier::expandTemplate assertion failure) 2014-01-05 19:19:52 +01:00
templatesimplifier.h Fixed #4446 (Crash on complex C++ template) 2013-11-21 20:27:24 +01:00
timer.cpp Fixed #5306 (Implement --showtime=top5) 2014-01-03 10:45:14 +01:00
timer.h Fixed #5306 (Implement --showtime=top5) 2014-01-03 10:24:57 +01:00
token.cpp added debug output for the value flow 2014-01-18 09:58:32 +01:00
token.h value flow: refactor. added Token::getMaxValue() 2014-01-21 16:58:23 +01:00
tokenize.cpp Fixed #5416 (False positive: Array accessed at index, which is out of bounds.) 2014-01-28 16:55:10 +01:00
tokenize.h Tokenizer: Removed simplifyGoto as it's the cause of various FPs I see 2014-01-17 17:36:45 +01:00
tokenlist.cpp ast: fixed syntax tree for 'a=(b)?1:0'. The parentheses should not be in the syntax tree 2014-01-30 17:31:06 +01:00
tokenlist.h Fixed #5423 (fix parsing of #line NNNN "file.c") 2014-01-28 17:15:07 +01:00
valueflow.cpp Fixed #5433 (FP:Possible null pointer dereference) 2014-01-31 15:43:34 +01:00
valueflow.h value flow: fix fp when conditional value is assigned 2014-01-25 20:14:49 +01:00
version.h Set version to "1.64 dev"/1.63.99. Use version.h in cppcheck.cpp. 2014-01-04 10:41:13 +01:00
version.rc