2025-05-10 02:22 ftp://ftp.de.debian.org/debian/pool/main/d/dmg2img/dmg2img_1.6.7+git20201227.a3e4134.orig.tar.xz cppcheck-options: --library=posix --library=gnu --library=bsd --library=openssl --library=zlib --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 -j3 platform: Linux-6.8.0-1022-oracle-aarch64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: b3c7f00 (2025-05-09 17:59:20 +0200) count: 47 47 elapsed-time: 0.4 0.4 head-timing-info: old-timing-info: head results: dmg2img-1.6.7+git20201227.a3e4134/base64.c:35:16: style: Variable 'tinp2' can be declared as pointer to const [constVariablePointer] dmg2img-1.6.7+git20201227.a3e4134/base64.c:65:17: style: Parameter 'out' can be declared as pointer to const [constParameterPointer] dmg2img-1.6.7+git20201227.a3e4134/base64.c:74:7: style: Variable 'out' is assigned a value that is never used. [unreadVariable] dmg2img-1.6.7+git20201227.a3e4134/adc.c:104:17: style: Variable 'c' can be declared as pointer to const [constVariablePointer] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:114:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:131:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:209:67: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AES_DECRYPT [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:226:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:315:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:356:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:416:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.h:174:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PRIx32 [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:51:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.c:53:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.c:65:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.c:84:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.c:151:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:459:21: style: Condition 'hdr_version>0' is always true [knownConditionTrueFalse] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:456:41: note: Calling function 'determine_header_version' returns 2 dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:456:41: note: Assignment 'hdr_version=determine_header_version(in)', assigned value is 2 dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:459:21: note: Condition 'hdr_version>0' is always true dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:467:19: style: Condition 'hdr_version==1' is always false [knownConditionTrueFalse] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:456:41: note: Calling function 'determine_header_version' returns 2 dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:456:41: note: Assignment 'hdr_version=determine_header_version(in)', assigned value is 2 dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:467:19: note: Condition 'hdr_version==1' is always false dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:476:19: style: Condition 'hdr_version==2' is always true [knownConditionTrueFalse] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:456:41: note: Calling function 'determine_header_version' returns 2 dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:456:41: note: Assignment 'hdr_version=determine_header_version(in)', assigned value is 2 dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:476:19: note: Condition 'hdr_version==2' is always true dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:240:5: error: Memory leak: TEMP2 [memleak] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:240:5: error: Memory leak: CEKICV [memleak] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:244:5: error: Memory leak: TEMP2 [memleak] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:244:5: error: Memory leak: CEKICV [memleak] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:106:25: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:108:9: style: Variable 'sep' can be declared as pointer to const [constVariablePointer] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:119:24: style: Parameter 'str' can be declared as pointer to const [constParameterPointer] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:351:36: style: Parameter 'dmg' can be declared as pointer to const [constParameterPointer] dmg2img-1.6.7+git20201227.a3e4134/vfdecrypt.c:355:17: style: Parameter 'message' can be declared as pointer to const [constParameterPointer] dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:51:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:56:5: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.c:304:5: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.c:304:5: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.c:746:5: warning: %lld in format string (no. 1) requires 'long long' but the argument type is 'unsigned long long'. [invalidPrintfArgType_sint] dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:11:42: warning: If resource allocation fails, then there is a possible null pointer dereference: F [nullPointerOutOfResources] dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:31:17: note: Assuming allocation function fails dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:31:17: note: Assignment 'F=fopen(filename,"rb")', assigned value is 0 dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:33:18: note: Calling function 'read_gpt_header', 1st argument 'F' value is 0 dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:11:42: note: Null pointer dereference dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:32:9: warning: If resource allocation fails, then there is a possible null pointer dereference: F [nullPointerOutOfResources] dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:31:17: note: Assuming allocation function fails dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:31:17: note: Assignment 'F=fopen(filename,"rb")', assigned value is 0 dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:32:9: note: Null pointer dereference dmg2img-1.6.7+git20201227.a3e4134/dmg2img.c:103:8: style: Variable 'input_file' can be declared as pointer to const [constVariablePointer] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.c:108:28: style: Variable 'data_end' can be declared as pointer to const [constVariablePointer] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.c:109:32: style: Variable 'partname_end' can be declared as pointer to const [constVariablePointer] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.h:57:8: style: Variable 'p_i' can be declared as pointer to const [constVariablePointer] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.h:69:8: style: Variable 'p_i' can be declared as pointer to const [constVariablePointer] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.h:82:39: style: Parameter 'c' can be declared as pointer to const [constParameterPointer] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.h:172:46: style: Parameter 'm' can be declared as pointer to const [constParameterPointer] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.h:186:25: style: Parameter 'c' can be declared as pointer to const [constParameterPointer] dmg2img-1.6.7+git20201227.a3e4134/mntcmd.h:20:26: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.c:395:21: style: Variable 'add_offs' is assigned a value that is never used. [unreadVariable] dmg2img-1.6.7+git20201227.a3e4134/dmg2img.c:507:12: style: Variable 'err' is assigned a value that is never used. [unreadVariable] diff: DONE