2025-12-27 20:47 ftp://ftp.de.debian.org/debian/pool/main/f/fortunes-bofh-excuses/fortunes-bofh-excuses_1.2.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j1 platform: Linux-6.8.0-90-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.69 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 cppcheck: head 2.19.0 head-info: a5ec929 (2025-12-24 09:21:38 +0100) count: 16 16 elapsed-time: 0.3 0.2 head-timing-info: old-timing-info: head results: fortunes-bofh-excuses-1.2/src/l2f.cc:15:24: warning: If resource allocation fails, then there is a possible null pointer dereference: r [nullPointerOutOfResources] fortunes-bofh-excuses-1.2/src/l2f.cc:12:8: note: Assuming allocation function fails fortunes-bofh-excuses-1.2/src/l2f.cc:12:8: note: Assignment 'r=fopen("excuses","r")', assigned value is 0 fortunes-bofh-excuses-1.2/src/l2f.cc:15:24: note: Null pointer dereference fortunes-bofh-excuses-1.2/src/l2f.cc:17:13: warning: If resource allocation fails, then there is a possible null pointer dereference: w [nullPointerOutOfResources] fortunes-bofh-excuses-1.2/src/l2f.cc:13:8: note: Assuming allocation function fails fortunes-bofh-excuses-1.2/src/l2f.cc:13:8: note: Assignment 'w=fopen("bofh-excuses","w")', assigned value is 0 fortunes-bofh-excuses-1.2/src/l2f.cc:17:13: note: Null pointer dereference fortunes-bofh-excuses-1.2/src/l2f.cc:21:8: warning: If resource allocation fails, then there is a possible null pointer dereference: w [nullPointerOutOfResources] fortunes-bofh-excuses-1.2/src/l2f.cc:13:8: note: Assuming allocation function fails fortunes-bofh-excuses-1.2/src/l2f.cc:13:8: note: Assignment 'w=fopen("bofh-excuses","w")', assigned value is 0 fortunes-bofh-excuses-1.2/src/l2f.cc:21:8: note: Null pointer dereference fortunes-bofh-excuses-1.2/src/strfile.c:348:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunes-bofh-excuses-1.2/src/strfile.c:357:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunes-bofh-excuses-1.2/src/strfile.c:366:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunes-bofh-excuses-1.2/src/strfile.c:410:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pos [valueFlowBailoutIncompleteVar] fortunes-bofh-excuses-1.2/src/strfile.c:233:4: error: Common realloc mistake: 'Firstch' nulled but not freed upon failure [memleakOnRealloc] fortunes-bofh-excuses-1.2/src/strfile.c:386:3: error: Common realloc mistake: 'Seekpts' nulled but not freed upon failure [memleakOnRealloc] fortunes-bofh-excuses-1.2/src/strfile.c:411:16: warning: If resource allocation fails, then there is a possible null pointer dereference: Sort_1 [nullPointerOutOfResources] fortunes-bofh-excuses-1.2/src/strfile.c:403:16: note: Assuming allocation function fails fortunes-bofh-excuses-1.2/src/strfile.c:403:16: note: Assignment 'Sort_1=fopen(Infile,"r")', assigned value is 0 fortunes-bofh-excuses-1.2/src/strfile.c:411:16: note: Null pointer dereference fortunes-bofh-excuses-1.2/src/strfile.c:412:16: warning: If resource allocation fails, then there is a possible null pointer dereference: Sort_2 [nullPointerOutOfResources] fortunes-bofh-excuses-1.2/src/strfile.c:404:16: note: Assuming allocation function fails fortunes-bofh-excuses-1.2/src/strfile.c:404:16: note: Assignment 'Sort_2=fopen(Infile,"r")', assigned value is 0 fortunes-bofh-excuses-1.2/src/strfile.c:412:16: note: Null pointer dereference fortunes-bofh-excuses-1.2/src/strfile.c:232:5: style: 'continue' is redundant since it is the last statement in a loop. [redundantContinue] fortunes-bofh-excuses-1.2/src/strfile.c:184:33: style: Variable 'p' can be declared as pointer to const [constVariablePointer] fortunes-bofh-excuses-1.2/src/strfile.c:186:9: style: Variable 'nsp' can be declared as pointer to const [constVariablePointer] fortunes-bofh-excuses-1.2/src/strfile.c:364:8: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] fortunes-bofh-excuses-1.2/src/strfile.c:401:7: style: Variable 'fp' can be declared as pointer to const [constVariablePointer] diff: DONE