603 Commits

Author SHA1 Message Date
PKEuS
03e44d4aa0 CheckMemoryLeakInFunction: Don't treat delete as delete operator for C code
Fixed GCC message in checkbufferoverrun.cpp
2015-01-30 20:55:53 +01:00
PKEuS
98e33a189f Enhanced CheckBufferOverrun:
- Fixed bug in library: manual and existing libraries use "size", but library.cpp reads "sizeof" as podtype attribute
- Fixed a couple of bugs in handling unknown size in checkbufferoverrun.cpp, get size from library if available.
2015-01-30 20:27:48 +01:00
Dmitry-Me
e7bb43fc6b Cache and reuse token pointer 2015-01-27 10:23:58 +03:00
Thomas Jarosch
fd01cafb1b Clean up redundant pointer operations 2015-01-17 16:29:50 +01:00
PKEuS
fd2f93bb80 Two small refactorizations:
- Avoid leaving and entering again critical section without doing anything
- Use isPointer() in checkbufferoverrun.cpp instead of string comparison
2015-01-10 21:03:21 +01:00
Daniel Marjamäki
2375f1c46d CheckBufferOverrun: Fix FN when multifile checking is used. 2015-01-08 21:01:22 +01:00
Daniel Marjamäki
6a8293a8b7 Library: More strict matching of functions 2015-01-08 19:31:41 +01:00
Robert Reif
ba1c24ee65 Fixed (symbol database: put function flags into a single flag variable) 2015-01-08 05:45:31 +01:00
Daniel Marjamäki
6c3b7c1d0e CheckBufferOverrun: only report warnings when --enable=warning has been used 2015-01-06 15:14:15 +01:00
Daniel Marjamäki
ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
Thomas Jarosch
69b31a0743 Fix up extra whitespaces in match patterns
Detected by new internal check.
2014-12-30 14:53:43 +01:00
Daniel Marjamäki
208761f0c3 Fixed (crash: CheckBufferOverrun) 2014-12-28 10:05:08 +01:00
PKEuS
8b59c39c42 Refactorization: Removed whitespaces at the end of Token::Match patterns 2014-12-27 11:09:54 +01:00
Daniel Marjamäki
6194a4eefd Fixed (Improve check: pointer arithmetic 'p+x' overrun, conditional x) 2014-12-26 09:12:00 +01:00
Daniel Marjamäki
7ab12cea63 Improved pointer arithmetic message 2014-12-25 14:31:46 +01:00
Daniel Marjamäki
bc594d52c8 Fixed (Pointer arithmetic: clarify message) 2014-12-25 10:05:55 +01:00
Daniel Marjamäki
7cfa54f0e0 Fixed (False positive: CheckBufferOverrun checking reassigned array function parameter) 2014-12-24 14:03:52 +01:00
Daniel Marjamäki
90bd38a972 Renamed isCasted to isCast 2014-12-24 10:35:40 +01:00
Daniel Marjamäki
1b2a23b3fe Fixed (Tokenizer::simplifyCast: set Token::isCasted when cast is removed) 2014-12-23 16:16:14 +01:00
Daniel Marjamäki
e16a934fb3 CheckBufferOverrun: Added comment in code to clarify why severity is portability for pointerOutOfBounds message. 2014-12-22 15:41:46 +01:00
Daniel Marjamäki
10ae551fef CheckBufferOverrun: Use portability warning for pointer arithmetic UB. It can be used by intention and usually works as intended. 2014-12-22 10:56:17 +01:00
Daniel Marjamäki
93ac5a41cd Fixed (pointer calculation overflow) 2014-12-22 09:38:00 +01:00
Daniel Marjamäki
a95e5bff2b Fixed (false positive: out of bounds access when array size is unknown) 2014-12-20 18:50:08 +01:00
Daniel Marjamäki
a1537e1a6e Fixed (false negative: array index out of bounds on allocated buffer using valueflow) 2014-12-17 16:23:48 +01:00
Alexander Mai
c2584aa635 crash in CheckBufferOverrun. Add check on loop variable in CheckBufferOverrun::checkScope(). 2014-12-04 20:49:58 +01:00
Daniel Marjamäki
0b9d80c95d Refactoring CheckUnusedFunctions so it uses new infrastructure for multifile analysis 2014-12-02 06:41:18 +01:00
Dmitry-Me
cf3f8c2f38 Refactoring: Replace names with underscores with camelCase names 2014-12-01 16:22:56 +01:00
Daniel Marjamäki
a002654c47 Reverted refactoring 828417c for now. It caused a major slowdown in the unused functions checking. 2014-11-24 06:37:08 +01:00
Daniel Marjamäki
828417c934 CheckUnusedFunction: Refactorings to use same infrastructure for whole program analysis as CheckUninitVar and CheckBufferOverrun 2014-11-15 18:44:23 +01:00
Daniel Marjamäki
de7e9223b8 Fixed (Improve check: multifile checking in checkbufferoverrun) 2014-11-15 10:43:49 +01:00
Frank Zingsheim
71c5d4bd60 Ticket (cppOut of bounds array access)
--HG--
extra : rebase_source : 79ed3533a12a486ea3ed3f09f9bc55b1a4771161
2014-10-21 22:56:53 +02:00
orbitcowboy
f36aaae732 Fixed a typo in a comment. No functional changes. 2014-09-30 14:54:59 +02:00
PKEuS
68b26f8faa Fixed subsequent false negatives in CheckBufferOverrun::checkInsecureCmdLineArgs() () 2014-09-29 15:38:33 +02:00
Alexander Mai
ccd80e3407 FP: Unknown type is assumed to have size 0. 2014-09-27 21:51:11 +02:00
Dmitry-Me
7c4b9bed9e Move declaration, run check earlier 2014-09-16 13:34:16 +04:00
Dmitry-Me
e050fba414 Move declaration closer to where it is used 2014-09-11 11:26:35 +04:00
PKEuS
117e45f8af Merge pull request from Dmitry-Me/fixBufferOverrun
Fix potential buffer overrun
2014-09-06 23:03:02 +02:00
Dmitry-Me
7342a81ea7 Minor refactorings. rename token. cleanup if/else. 2014-09-02 16:10:51 +02:00
PKEuS
7f2be2f57c Fixed template bracket linkage in while loop simplification
Ran AStyle
2014-08-23 12:28:54 +02:00
Daniel Marjamäki
b6355b991f Fixed (false positive: Array 'array[8192]' accessed at index 8192, which is out of bounds) 2014-08-19 07:03:00 +02:00
Dmitry-Me
406239dfc7 Fix potential buffer overrun 2014-08-12 17:44:20 +04:00
Daniel Marjamäki
47a2b35e98 BufferOverrun: Use ValueFlow string values more 2014-08-04 08:25:10 +02:00
Daniel Marjamäki
79fc549de0 ValueFlow: start adding valueflow handling of strings and pointer aliases 2014-08-03 20:11:22 +02:00
PKEuS
6d3cb86d2a Merge pull request from Dmitry-Me/bringDeclarationsCloserToWhereTheyAreNeeded
Bring variable declarations closer to where they're first used.
2014-08-02 11:12:34 +02:00
Daniel Marjamäki
f2e3700142 Merge pull request from moshekaplan/patch-1
Updated message for strncat usage
2014-08-02 11:10:16 +02:00
Daniel Marjamäki
7237b01979 Fixed Cppcheck warning 2014-08-02 10:07:23 +02:00
Daniel Marjamäki
544a5957e1 Token: Added utility function getStrSize as a complement to getStrLength 2014-08-01 13:12:18 +02:00
Moshe Kaplan
e881495eaf Updated message for strncat usage 2014-07-31 13:51:29 -04:00
Daniel Marjamäki
5de1e35350 CheckBufferOverrun: Fixed minsize checking of string literals. Check sizeof string instead of strlen. 2014-07-30 20:35:21 +02:00
Dmitry-Me
ee180787eb Bring variable declarations closer to where they're first used. 2014-07-29 13:59:45 +04:00