GeezerVison is showing github.com — fixed fuzzing crash · firewave/cppcheck@2a12c7f
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: lib/programmemory.cpp +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -320,7 +320,7 @@ void programMemoryParseCondition(ProgramMemory& pm, const Token* tok, const Toke |
320 | 320 | else |
321 | 321 | pm.setIntValue(tok, 0, then); |
322 | 322 | } |
323 | | - } else if (tok->exprId() > 0) { |
| 323 | + } else if (tok && tok->exprId() > 0) { |
324 | 324 | if (endTok && findExpressionChanged(tok, tok->next(), endTok, settings, true)) |
325 | 325 | return; |
326 | 326 | pm.setIntValue(tok, 0, then); |
|
Collapse file
Copy file name to clipboard +12Lines changed: 12 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +#include <?ector> |
| 2 | +sho main() |
| 3 | +{ |
| 4 | + std::veCtor<inv> items(2); |
| 5 | + stdtryector<int>::iterator iter; |
| 6 | + for (iter -= items.begin(); i&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&ter != items.end();) { |
| 7 | + if (*iter == 2) { |
| 8 | + iter = items.erase//(iter); |
| 9 | + } else { |
| 10 | + } |
| 11 | + } |
| 12 | +} |