Commit Graph

6418 Commits

Author SHA1 Message Date
Alexander Mai 6ba9c21fb9 #6786 segmentation fault (invalid code) in Tokenizer::simplifyRedundantParentheses. Small refactoring for Tokenizer::simplifyTokenList2() including additional calls to validate() - which prevents heap corruption on invalid code 2015-06-24 20:22:28 +02:00
amai2012 9fedc9bd74 #6788 segmentation fault (invalid code) in Tokenizer::simplifyVarDecl. Fix null pointer access 2015-06-24 16:54:23 +02:00
Alexander Mai f806d945a1 Refactoring: Allow TemplateSimplifier to throw InternalErrors by itself. 2015-06-23 20:53:57 +02:00
amai2012 69f91ac187 #6785 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. Avoid null pointer access 2015-06-23 17:59:01 +02:00
Alexander Mai 07bcc7157b #6784 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. Avoid null pointer access 2015-06-22 20:43:26 +02:00
amai2012 99524b1f59 #6780 segmentation fault (invalid code) in Token::multiCompare. Simple fix in CheckOther 2015-06-22 11:12:46 +02:00
Alexander Mai b6858622eb #6779 internal error: division overflow. Previous error handling (see #4520) was too restrictive. 2015-06-20 23:15:35 +02:00
Simon Martin 7481fbb028 Fixed #6506 (Properly detect calls to the deallocating free() function) 2015-06-20 21:00:54 +02:00
Daniel Marjamäki 1d49334398 Fixed #6662 (False positive assignIfError (assignment in while condition)) 2015-06-20 16:23:16 +02:00
Alexander Mai 272cc55ab8 #5309 False positive: redundantCondition - comparing large integer values (unsigned long long). Testcase added, issue got fixed before. 2015-06-20 12:18:24 +02:00
Daniel Marjamäki 63f39ea48f Change unusedScopedObject severity from error to style. The checker does not determine that there is ub or wrong behaviour. 2015-06-20 11:22:15 +02:00
Simon Martin cba0583045 Ticket #6536: Properly handle variables whose name is that of an allocation function. 2015-06-19 23:48:40 +02:00
Daniel Marjamäki af4a4663e2 Fixed #6764 (False positive redundantCondition - !(i>1) is not i<1) 2015-06-19 19:49:05 +02:00
Daniel Marjamäki 02df692b0b Fixed #4760 (false negative: (error) usage of uninitialized variable (struct member)) 2015-06-19 18:21:46 +02:00
Alexander Mai 712919a691 #6431 Invalid XML created - Invalid encoding of string literal. Partial fix: ensure the short message string is also processed to avoid problems with non-terminated string. 2015-06-18 21:16:25 +02:00
Alexander Mai 13c1c2c035 Refactoring (use const std::set for strings). Omit some matching for C++ stuff within C code. 2015-06-17 22:28:15 +02:00
Daniel Marjamäki a884362817 Fixed #6752 (wrong AST when there is lambda function) 2015-06-17 19:32:44 +02:00
orbitcowboy 06e818f89d Running astyle, no functional change. 2015-06-17 09:09:23 +02:00
amai2012 33d7631ee3 Fix another Borlad-specific test by setting Windows platform type
Refactoring: make CheckIO::ArgumentInfo aware of language (C vs. C++) to perform some optimizations
2015-06-16 23:11:34 +02:00
amai2012 a8db00b4bf Repair test which had to be adjusted after previous changeset.
Refactoring: Add some const
2015-06-16 22:45:33 +02:00
amai2012 e32257db0a Add new test file: testtokenlist.cpp to testrunner 2015-06-16 20:30:09 +02:00
Martin Ettl 9b14ab15eb MathLib::intsuffix: Added support for LLU and LU suffixes. 2015-06-16 19:12:18 +02:00
Daniel Marjamäki 2cc23b4bb3 MathLib: Try to keep type suffix in constant calculations 2015-06-15 19:01:56 +02:00
Alexander Mai a5a835b1e0 #6771 segmentation fault (invalid code) in SymbolDatabase::SymbolDatabase 2015-06-14 22:18:28 +02:00
Daniel Marjamäki 1e1ba6b4a9 Fixed #6574 (False positive oppositeInnerCondition - unknown variable) 2015-06-14 20:06:05 +02:00
Alexander Mai 70ba6c4340 #6767 False positive: memory leak when variable name is 'new'. Fix handling of new in C code. Move some tests for TokenList to new testtokenlist.cpp 2015-06-14 15:49:49 +02:00
Alexander Mai fff3db48a7 Refactoring to address some issues from #5895 (handling of unsigned numbers). Also adding a TODO testcase since the real issue (FP) is still not fixed 2015-06-13 18:14:55 +02:00
Alexander Mai a7b82b5c28 Refactoring to address some issues from #5895 (handling of unsigned numbers). Also adding a TODO testcase since the real issue (FP) is still not fixed 2015-06-13 18:08:13 +02:00
Dmitry-Me cae605b1ec New warning: warn about redundant code in condition. 2015-06-10 18:53:55 +02:00
Daniel Marjamäki 0ca410a4d7 Fixed #6668 (False positive bufferAccessOutOfBounds on sprintf() - regression) 2015-06-07 14:01:20 +02:00
Alexander Mai c18461b173 #6761 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. Fix crash. 2015-06-07 13:35:51 +02:00
Daniel Marjamäki 75b0430ba5 Token::strValue: fixed handling of backslash 2015-06-07 11:25:33 +02:00
Alexander Mai b6264e4a00 #6759 segmentation fault (invalid code) in Tokenizer::simplifyTokenList2. #6760 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. Fix crashes 2015-06-06 13:11:32 +02:00
orbitcowboy eed0c0df14 Merge pull request #610 from simartin/ticket_6665_test
Ticket #6665 (dupe of #6588): Added test case.
2015-06-06 03:28:51 +02:00
Simon Martin 0ebaa9b8c4 Ticket #6463 (dupe of #6680): Added test case. 2015-06-05 23:57:42 +02:00
Simon Martin 311db970c5 Ticket #6665 (dupe of #6588): Added test case. 2015-06-05 23:44:03 +02:00
Daniel Marjamäki d208e763df astyle formatting 2015-06-05 14:34:53 +02:00
Daniel Marjamäki e36cc9f6d9 stringLiteralWrite: Updated error message 2015-06-05 14:34:13 +02:00
amai 5fd9dd04fa #6757 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. Fix crash 2015-06-04 19:00:35 +02:00
Alexander Mai 5f4902c613 6755 segmentation fault (invalid code) in Token::isAssignmentOp. #6756 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. Fix two crashes. 2015-06-04 17:46:52 +02:00
amai2012 f2d397882f #6753 segmentation fault (invalid code) in CheckMemoryLeakStructMember::checkStructVariable. #6754 segmentation fault (invalid code) in CheckUnusedVar::checkFunctionVariableUsage_iterateScopes. Trivial fixes to avoid null pointer access 2015-06-03 17:17:53 +02:00
amai2012 87bf09c0ae #6751 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. 2015-06-03 11:39:30 +02:00
amai2012 ed5a4127e8 #6749 segmentation fault (invalid code) in Tokenizer::copyTokens. #6750 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. 2015-06-03 10:39:19 +02:00
amai2012 d36c84553f #6748 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. Throw error from now (member-function) Tokenizer::processFunc 2015-06-03 08:59:38 +02:00
Alexander Mai d86ac9e3ed #6747 segmentation fault (invalid code) in Token::isAttributeConstructor 2015-06-02 22:26:17 +02:00
Alexander Mai 09f2cff519 #6746 segmentation fault (invalid code) in Tokenizer::simplifyTypedef 2015-06-02 21:52:08 +02:00
Alexander Mai 6e1b5a0a53 #6744 segmentation fault (invalid code) in Tokenizer::simplifyPointerToStandardType. #6745 segmentation fault (invalid code) in Tokenizer::simplifyTypedef 2015-06-02 21:20:41 +02:00
Alexander Mai 454d4573b4 #6742 segmentation fault (invalid code) in SymbolDatabase::SymbolDatabase. Fix in Type::initBaseInfo() 2015-06-02 20:15:21 +02:00
Alexander Mai f348c8eebe #6741 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. 2015-06-02 20:09:12 +02:00
Alexander Mai 7fc9930b38 #6740 segmentation fault (invalid code) in Tokenizer::simplifyFunctionPointers. Throw syntaxError instead 2015-06-02 19:48:20 +02:00