2025-11-27 14:06 ftp://ftp.de.debian.org/debian/pool/main/l/ldap2dns/ldap2dns_0.3.1.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 -j4 platform: Linux-6.12.57+deb13-amd64-x86_64-with-glibc2.41 python: 3.13.5 client-version: 1.3.67 compiler: g++ (Debian 14.2.0-19) 14.2.0 cppcheck: head 2.18.0 head-info: 12d0391 (2025-11-27 14:38:18 +0100) count: 71 71 elapsed-time: 3.1 3.7 head-timing-info: old-timing-info: head results: ldap2dns-0.3.1/askldap.c:72:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/askldap.c:117:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable bv_len [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/askldap.c:188:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable bv_len [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/askldap.c:243:56: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_SCOPE_SUBTREE [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/askldap.c:314:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_SCOPE_SUBTREE [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/askldap.c:381:49: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_SCOPE_SUBTREE [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/askldap.c:429:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_SCOPE_SUBTREE [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/askldap.c:521:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DNS_T_A [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/askldap.c:578:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DNS_T_SOA [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/askldap.c:622:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DNS_T_A [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/askldap.c:631:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_PORT [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/askldap.c:671:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DNS_T_ANY [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/ldap2dns.c:36:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable VERSION [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/ldap2dns.c:43:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/ldap2dns.c:103:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/ldap2dns.c:145:80: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_PORT [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/ldap2dns.c:171:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_PORT [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/ldap2dns.c:191:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_PORT [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/ldap2dns.c:477:46: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_SCOPE_SUBTREE [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/ldap2dns.c:649:156: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_SUCCESS [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/ldap2dns.c:681:153: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_SUCCESS [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/ldap2dns.c:802:71: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_SUCCESS [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/ldap2dns.c:832:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] ldap2dns-0.3.1/askldap.c:333:10: error: Array 'zonedn[256]' accessed at index -1, which is out of bounds. [negativeIndex] ldap2dns-0.3.1/askldap.c:327:17: note: Assignment 'len=0', assigned value is 0 ldap2dns-0.3.1/askldap.c:331:25: note: Assuming condition is false ldap2dns-0.3.1/askldap.c:333:10: note: Negative array index ldap2dns-0.3.1/askldap.c:132:22: style: Array index 'k' is used before limits check. [arrayIndexThenCheck] ldap2dns-0.3.1/askldap.c:120:9: error: Width 64 given in format string (no. 1) is larger than destination buffer 'tmp[64]', use %63s to prevent overflowing it. [invalidScanfFormatWidth] ldap2dns-0.3.1/askldap.c:313:2: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'. [invalidPrintfArgType_uint] ldap2dns-0.3.1/askldap.c:313:2: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'int'. [invalidPrintfArgType_uint] ldap2dns-0.3.1/askldap.c:313:2: warning: %u in format string (no. 3) requires 'unsigned int' but the argument type is 'int'. [invalidPrintfArgType_uint] ldap2dns-0.3.1/askldap.c:313:2: warning: %u in format string (no. 4) requires 'unsigned int' but the argument type is 'int'. [invalidPrintfArgType_uint] ldap2dns-0.3.1/askldap.c:322:4: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'. [invalidPrintfArgType_uint] ldap2dns-0.3.1/askldap.c:322:4: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'int'. [invalidPrintfArgType_uint] ldap2dns-0.3.1/askldap.c:322:4: warning: %u in format string (no. 3) requires 'unsigned int' but the argument type is 'int'. [invalidPrintfArgType_uint] ldap2dns-0.3.1/askldap.c:322:4: warning: %u in format string (no. 4) requires 'unsigned int' but the argument type is 'int'. [invalidPrintfArgType_uint] ldap2dns-0.3.1/askldap.c:220:9: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] ldap2dns-0.3.1/askldap.c:306:70: style: Parameter 'ip' can be declared as const array [constParameter] ldap2dns-0.3.1/ldap2dns.c:352:63: warning: Either the condition 'ipdx==0' is redundant or the array 'rr->ipaddr[256][32]' is accessed at index 256, which is out of bounds. [arrayIndexOutOfBoundsCond] ldap2dns-0.3.1/ldap2dns.c:349:18: note: Assuming that condition 'ipdx==0' is not redundant ldap2dns-0.3.1/ldap2dns.c:352:63: note: Array index out of bounds ldap2dns-0.3.1/ldap2dns.c:376:63: warning: Either the condition 'ipdx==0' is redundant or the array 'rr->ipaddr[256][32]' is accessed at index 256, which is out of bounds. [arrayIndexOutOfBoundsCond] ldap2dns-0.3.1/ldap2dns.c:373:18: note: Assuming that condition 'ipdx==0' is not redundant ldap2dns-0.3.1/ldap2dns.c:376:63: note: Array index out of bounds ldap2dns-0.3.1/ldap2dns.c:532:34: style: Array index 'ipaddresses' is used before limits check. [arrayIndexThenCheck] ldap2dns-0.3.1/ldap2dns.c:713:32: style: Array index 'zonenames' is used before limits check. [arrayIndexThenCheck] ldap2dns-0.3.1/ldap2dns.c:301:24: error: Found an exit path from function with non-void return type that has missing return statement [missingReturn] ldap2dns-0.3.1/ldap2dns.c:328:1: error: Found an exit path from function with non-void return type that has missing return statement [missingReturn] ldap2dns-0.3.1/ldap2dns.c:649:5: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] ldap2dns-0.3.1/ldap2dns.c:351:18: style: Condition 'ipdx>0' is always true [knownConditionTrueFalse] ldap2dns-0.3.1/ldap2dns.c:349:18: note: Assuming that condition 'ipdx==0' is not redundant ldap2dns-0.3.1/ldap2dns.c:351:18: note: Condition 'ipdx>0' is always true ldap2dns-0.3.1/ldap2dns.c:375:18: style: Condition 'ipdx>0' is always true [knownConditionTrueFalse] ldap2dns-0.3.1/ldap2dns.c:373:18: note: Assuming that condition 'ipdx==0' is not redundant ldap2dns-0.3.1/ldap2dns.c:375:18: note: Condition 'ipdx>0' is always true ldap2dns-0.3.1/ldap2dns.c:162:26: error: Width 128 given in format string (no. 1) is larger than destination buffer 'value[128]', use %127s to prevent overflowing it. [invalidScanfFormatWidth] ldap2dns-0.3.1/ldap2dns.c:162:26: error: Width 512 given in format string (no. 3) is larger than destination buffer 'rest[512]', use %511[A-Za-z0-9 .:_+-] to prevent overflowing it. [invalidScanfFormatWidth] ldap2dns-0.3.1/ldap2dns.c:169:33: error: Width 128 given in format string (no. 1) is larger than destination buffer 'value[128]', use %127s to prevent overflowing it. [invalidScanfFormatWidth] ldap2dns-0.3.1/ldap2dns.c:169:33: error: Width 512 given in format string (no. 2) is larger than destination buffer 'rest[512]', use %511[A-Za-z0-9 .:_+-] to prevent overflowing it. [invalidScanfFormatWidth] ldap2dns-0.3.1/ldap2dns.c:195:8: error: Width 128 given in format string (no. 1) is larger than destination buffer 'value[128]', use %127s to prevent overflowing it. [invalidScanfFormatWidth] ldap2dns-0.3.1/ldap2dns.c:197:8: error: Width 512 given in format string (no. 1) is larger than destination buffer 'value[128]', use %127[A-Za-z0-9 .:_+-] to prevent overflowing it. [invalidScanfFormatWidth] ldap2dns-0.3.1/ldap2dns.c:202:8: error: Width 128 given in format string (no. 1) is larger than destination buffer 'value[128]', use %127s to prevent overflowing it. [invalidScanfFormatWidth] ldap2dns-0.3.1/ldap2dns.c:204:9: error: Width 128 given in format string (no. 1) is larger than destination buffer 'value[128]', use %127s to prevent overflowing it. [invalidScanfFormatWidth] ldap2dns-0.3.1/ldap2dns.c:563:11: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] ldap2dns-0.3.1/ldap2dns.c:400:7: style: Local variable 'ip' shadows outer variable [shadowVariable] ldap2dns-0.3.1/ldap2dns.c:333:7: note: Shadowed declaration ldap2dns-0.3.1/ldap2dns.c:400:7: note: Shadow variable ldap2dns-0.3.1/ldap2dns.c:401:8: style: Local variable 'buf' shadows outer variable [shadowVariable] ldap2dns-0.3.1/ldap2dns.c:334:7: note: Shadowed declaration ldap2dns-0.3.1/ldap2dns.c:401:8: note: Shadow variable ldap2dns-0.3.1/ldap2dns.c:482:9: style: Local variable 'dn' shadows outer argument [shadowArgument] ldap2dns-0.3.1/ldap2dns.c:471:40: note: Shadowed declaration ldap2dns-0.3.1/ldap2dns.c:482:9: note: Shadow variable ldap2dns-0.3.1/ldap2dns.c:112:8: style: Variable 'ev' can be declared as pointer to const [constVariablePointer] ldap2dns-0.3.1/ldap2dns.c:187:8: style: Variable 'ev' can be declared as pointer to const [constVariablePointer] ldap2dns-0.3.1/ldap2dns.c:326:32: style: Parameter 'target' can be declared as const array [constParameter] ldap2dns-0.3.1/ldap2dns.c:331:45: style: Parameter 'rr' can be declared as pointer to const [constParameterPointer] ldap2dns-0.3.1/ldap2dns.c:504:10: style: Variable 'dnsnname' can be declared as pointer to const [constVariablePointer] ldap2dns-0.3.1/ldap2dns.c:841:13: error: Uninitialized variable: soa_numzones [legacyUninitvar] ldap2dns-0.3.1/ldap2dns.c:186:19: style: Unused variable: fp [unusedVariable] ldap2dns-0.3.1/ldap2dns.c:333:7: style: Unused variable: ip [unusedVariable] ldap2dns-0.3.1/ldap2dns.c:334:7: style: Unused variable: buf [unusedVariable] ldap2dns-0.3.1/ldap2dns.c:502:12: style: Variable 'len' is assigned a value that is never used. [unreadVariable] ldap2dns-0.3.1/ldap2dns.c:504:19: style: Variable 'dnsnname' is assigned a value that is never used. [unreadVariable] ldap2dns-0.3.1/ldap2dns.c:502:8: style: Variable 'len' is assigned a value that is never used. [unreadVariable] ldap2dns-0.3.1/ldap2dns.c:504:10: style: Variable 'dnsnname' is assigned a value that is never used. [unreadVariable] ldap2dns-0.3.1/ldap2dns.c:611:7: style: Unused variable: soa [unusedVariable] diff: 2.18.0 ldap2dns-0.3.1/ldap2dns.c:301:0: error: Found an exit path from function with non-void return type that has missing return statement [missingReturn] head ldap2dns-0.3.1/ldap2dns.c:301:24: error: Found an exit path from function with non-void return type that has missing return statement [missingReturn] DONE