2026-05-04 10:44 ftp://ftp.de.debian.org/debian/pool/main/p/ptunnel/ptunnel_0.72.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=selinux --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-1047-aws-aarch64-with-glibc2.35 python: 3.10.12 client-version: 1.4.0 compiler: g++ (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0 cppcheck: head 2.20.0 head-info: e5c4a73 (2026-05-01 11:10:43 +0200) count: 73 71 elapsed-time: 1.8 1.6 head-timing-info: old-timing-info: head results: PingTunnel/._ptunnel.c:1:46: error: The code contains unhandled character(s) (character code=167). Neither unicode nor extended ascii is supported. [unhandledChar] PingTunnel/ptunnel.c:158:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] PingTunnel/ptunnel.c:480:94: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] PingTunnel/ptunnel.c:562:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable sockaddr_in [valueFlowBailoutIncompleteVar] PingTunnel/ptunnel.c:625:128: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] PingTunnel/ptunnel.c:876:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] PingTunnel/ptunnel.c:899:64: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ether_header [valueFlowBailoutIncompleteVar] PingTunnel/ptunnel.c:1128:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable sockaddr_in [valueFlowBailoutIncompleteVar] PingTunnel/ptunnel.c:1272:104: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable sockaddr [valueFlowBailoutIncompleteVar] PingTunnel/ptunnel.c:1606:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] PingTunnel/ptunnel.c:354:6: warning: Return value of function freopen() is not used. [ignoredReturnValue] PingTunnel/ptunnel.c:355:6: warning: Return value of function freopen() is not used. [ignoredReturnValue] PingTunnel/ptunnel.c:356:6: warning: Return value of function freopen() is not used. [ignoredReturnValue] PingTunnel/ptunnel.c:207:30: style: Obsolescent function 'gethostbyname' called. It is recommended to use 'getaddrinfo' instead. [prohibitedgethostbynameCalled] PingTunnel/ptunnel.c:227:30: style: Obsolescent function 'gethostbyname' called. It is recommended to use 'getaddrinfo' instead. [prohibitedgethostbynameCalled] PingTunnel/ptunnel.c:259:27: portability: Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. [prohibitedgetpwnamCalled] PingTunnel/ptunnel.c:269:27: portability: Non reentrant function 'getgrnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrnam_r'. [prohibitedgetgrnamCalled] PingTunnel/ptunnel.c:817:6: warning: memset() called to fill 0 bytes. [memsetZeroBytes] PingTunnel/ptunnel.c:1376:16: style: Condition 'ring[*insert_idx]' is always true [knownConditionTrueFalse] PingTunnel/ptunnel.c:870:2: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] PingTunnel/ptunnel.c:870:2: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] PingTunnel/ptunnel.c:870:2: warning: %d in format string (no. 5) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] PingTunnel/ptunnel.c:900:9: warning: If memory allocation fails, then there is a possible null pointer dereference: elem [nullPointerOutOfMemory] PingTunnel/ptunnel.c:899:15: note: Assuming allocation function fails PingTunnel/ptunnel.c:899:15: note: Assignment 'elem=malloc(sizeof(struct pqueue_elem_t)+hdr->caplen-sizeof(struct ether_header))', assigned value is 0 PingTunnel/ptunnel.c:900:9: note: Null pointer dereference PingTunnel/ptunnel.c:901:22: warning: If memory allocation fails, then there is a possible null pointer dereference: elem [nullPointerOutOfMemory] PingTunnel/ptunnel.c:899:15: note: Assuming allocation function fails PingTunnel/ptunnel.c:899:15: note: Assignment 'elem=malloc(sizeof(struct pqueue_elem_t)+hdr->caplen-sizeof(struct ether_header))', assigned value is 0 PingTunnel/ptunnel.c:901:22: note: Null pointer dereference PingTunnel/ptunnel.c:903:2: warning: If memory allocation fails, then there is a possible null pointer dereference: elem [nullPointerOutOfMemory] PingTunnel/ptunnel.c:899:15: note: Assuming allocation function fails PingTunnel/ptunnel.c:899:15: note: Assignment 'elem=malloc(sizeof(struct pqueue_elem_t)+hdr->caplen-sizeof(struct ether_header))', assigned value is 0 PingTunnel/ptunnel.c:903:2: note: Null pointer dereference PingTunnel/ptunnel.c:904:6: warning: If memory allocation fails, then there is a possible null pointer dereference: elem [nullPointerOutOfMemory] PingTunnel/ptunnel.c:899:15: note: Assuming allocation function fails PingTunnel/ptunnel.c:899:15: note: Assignment 'elem=malloc(sizeof(struct pqueue_elem_t)+hdr->caplen-sizeof(struct ether_header))', assigned value is 0 PingTunnel/ptunnel.c:904:6: note: Null pointer dereference PingTunnel/ptunnel.c:911:2: warning: If memory allocation fails, then there is a possible null pointer dereference: elem [nullPointerOutOfMemory] PingTunnel/ptunnel.c:899:15: note: Assuming allocation function fails PingTunnel/ptunnel.c:899:15: note: Assignment 'elem=malloc(sizeof(struct pqueue_elem_t)+hdr->caplen-sizeof(struct ether_header))', assigned value is 0 PingTunnel/ptunnel.c:904:18: note: Assuming condition is false PingTunnel/ptunnel.c:911:2: note: Null pointer dereference PingTunnel/ptunnel.c:1121:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1121:2: note: Null pointer dereference PingTunnel/ptunnel.c:1122:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1122:2: note: Null pointer dereference PingTunnel/ptunnel.c:1123:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1123:2: note: Null pointer dereference PingTunnel/ptunnel.c:1124:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1124:2: note: Null pointer dereference PingTunnel/ptunnel.c:1125:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1125:2: note: Null pointer dereference PingTunnel/ptunnel.c:1139:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1139:2: note: Null pointer dereference PingTunnel/ptunnel.c:1140:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1140:2: note: Null pointer dereference PingTunnel/ptunnel.c:1141:6: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1141:6: note: Null pointer dereference PingTunnel/ptunnel.c:1145:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1145:2: note: Null pointer dereference PingTunnel/ptunnel.c:1146:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1146:2: note: Null pointer dereference PingTunnel/ptunnel.c:1147:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1147:2: note: Null pointer dereference PingTunnel/ptunnel.c:1150:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1150:2: note: Null pointer dereference PingTunnel/ptunnel.c:1153:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1153:2: note: Null pointer dereference PingTunnel/ptunnel.c:1154:2: warning: If memory allocation fails, then there is a possible null pointer dereference: cur [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1120:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1120:19: note: Assignment 'cur=calloc(1,sizeof(struct proxy_desc_t))', assigned value is 0 PingTunnel/ptunnel.c:1154:2: note: Null pointer dereference PingTunnel/ptunnel.c:1240:2: warning: If memory allocation fails, then there is a possible null pointer dereference: pkt [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1237:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1237:19: note: Assignment 'pkt=malloc(pkt_len)', assigned value is 0 PingTunnel/ptunnel.c:1240:2: note: Null pointer dereference PingTunnel/ptunnel.c:1241:2: warning: If memory allocation fails, then there is a possible null pointer dereference: pkt [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1237:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1237:19: note: Assignment 'pkt=malloc(pkt_len)', assigned value is 0 PingTunnel/ptunnel.c:1241:2: note: Null pointer dereference PingTunnel/ptunnel.c:1242:2: warning: If memory allocation fails, then there is a possible null pointer dereference: pkt [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1237:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1237:19: note: Assignment 'pkt=malloc(pkt_len)', assigned value is 0 PingTunnel/ptunnel.c:1242:2: note: Null pointer dereference PingTunnel/ptunnel.c:1243:2: warning: If memory allocation fails, then there is a possible null pointer dereference: pkt [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1237:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1237:19: note: Assignment 'pkt=malloc(pkt_len)', assigned value is 0 PingTunnel/ptunnel.c:1243:2: note: Null pointer dereference PingTunnel/ptunnel.c:1244:2: warning: If memory allocation fails, then there is a possible null pointer dereference: pkt [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1237:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1237:19: note: Assignment 'pkt=malloc(pkt_len)', assigned value is 0 PingTunnel/ptunnel.c:1244:2: note: Null pointer dereference PingTunnel/ptunnel.c:1247:35: warning: If memory allocation fails, then there is a possible null pointer dereference: pkt [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1237:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1237:19: note: Assignment 'pkt=malloc(pkt_len)', assigned value is 0 PingTunnel/ptunnel.c:1247:35: note: Null pointer dereference PingTunnel/ptunnel.c:1263:2: warning: If memory allocation fails, then there is a possible null pointer dereference: pkt [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1237:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1237:19: note: Assignment 'pkt=malloc(pkt_len)', assigned value is 0 PingTunnel/ptunnel.c:1263:2: note: Null pointer dereference PingTunnel/ptunnel.c:1490:2: warning: If memory allocation fails, then there is a possible null pointer dereference: fwd_desc [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1489:21: note: Assuming allocation function fails PingTunnel/ptunnel.c:1489:21: note: Assignment 'fwd_desc=malloc(sizeof(struct forward_desc_t)+data_len)', assigned value is 0 PingTunnel/ptunnel.c:1490:2: note: Null pointer dereference PingTunnel/ptunnel.c:1491:2: warning: If memory allocation fails, then there is a possible null pointer dereference: fwd_desc [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1489:21: note: Assuming allocation function fails PingTunnel/ptunnel.c:1489:21: note: Assignment 'fwd_desc=malloc(sizeof(struct forward_desc_t)+data_len)', assigned value is 0 PingTunnel/ptunnel.c:1491:2: note: Null pointer dereference PingTunnel/ptunnel.c:1492:2: warning: If memory allocation fails, then there is a possible null pointer dereference: fwd_desc [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1489:21: note: Assuming allocation function fails PingTunnel/ptunnel.c:1489:21: note: Assignment 'fwd_desc=malloc(sizeof(struct forward_desc_t)+data_len)', assigned value is 0 PingTunnel/ptunnel.c:1492:2: note: Null pointer dereference PingTunnel/ptunnel.c:1507:10: warning: If memory allocation fails, then there is a possible null pointer dereference: data [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1237:19: note: Assuming allocation function fails PingTunnel/ptunnel.c:1237:19: note: Assignment 'pkt=malloc(pkt_len)', assigned value is 0 PingTunnel/ptunnel.c:1263:45: note: Calling function 'calc_icmp_checksum', 1st argument '(uint16_t*)pkt' value is 0 PingTunnel/ptunnel.c:1507:10: note: Null pointer dereference PingTunnel/ptunnel.c:1525:2: warning: If memory allocation fails, then there is a possible null pointer dereference: c [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1523:12: note: Assuming allocation function fails PingTunnel/ptunnel.c:1523:12: note: Assignment 'c=calloc(1,sizeof(struct challenge_t))', assigned value is 0 PingTunnel/ptunnel.c:1525:2: note: Null pointer dereference PingTunnel/ptunnel.c:1526:2: warning: If memory allocation fails, then there is a possible null pointer dereference: c [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1523:12: note: Assuming allocation function fails PingTunnel/ptunnel.c:1523:12: note: Assignment 'c=calloc(1,sizeof(struct challenge_t))', assigned value is 0 PingTunnel/ptunnel.c:1526:2: note: Null pointer dereference PingTunnel/ptunnel.c:1528:3: warning: If memory allocation fails, then there is a possible null pointer dereference: c [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1523:12: note: Assuming allocation function fails PingTunnel/ptunnel.c:1523:12: note: Assignment 'c=calloc(1,sizeof(struct challenge_t))', assigned value is 0 PingTunnel/ptunnel.c:1528:3: note: Null pointer dereference PingTunnel/ptunnel.c:1545:9: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] PingTunnel/ptunnel.c:1544:14: note: Assuming allocation function fails PingTunnel/ptunnel.c:1544:14: note: Assignment 'buf=malloc(sizeof(struct challenge_t)+kMD5_digest_size)', assigned value is 0 PingTunnel/ptunnel.c:1545:9: note: Null pointer dereference PingTunnel/ptunnel.c:813:20: style: Local variable 'cur' shadows outer variable [shadowVariable] PingTunnel/ptunnel.c:589:17: note: Shadowed declaration PingTunnel/ptunnel.c:813:20: note: Shadow variable PingTunnel/ptunnel.c:1454:8: style: Local variable 'i' shadows outer variable [shadowVariable] PingTunnel/ptunnel.c:1424:7: note: Shadowed declaration PingTunnel/ptunnel.c:1454:8: note: Shadow variable PingTunnel/ptunnel.c:124:17: style: Variable 'pwnam' can be declared as pointer to const [constVariablePointer] PingTunnel/ptunnel.c:125:16: style: Variable 'grnam' can be declared as pointer to const [constVariablePointer] PingTunnel/ptunnel.c:415:19: style: Parameter 'exec_name' can be declared as pointer to const [constParameterPointer] PingTunnel/ptunnel.c:860:38: style: Parameter 'xfer' can be declared as pointer to const [constParameterPointer] PingTunnel/ptunnel.c:895:16: style: Variable 'ip' can be declared as pointer to const [constVariablePointer] PingTunnel/ptunnel.c:1205:55: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] PingTunnel/ptunnel.c:1205:242: style: Parameter 'dest_addr' can be declared as pointer to const [constParameterPointer] PingTunnel/ptunnel.c:1425:21: style: Variable 'pt_pkt' can be declared as pointer to const [constVariablePointer] PingTunnel/ptunnel.c:1487:75: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] PingTunnel/ptunnel.c:1499:39: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] PingTunnel/ptunnel.c:1560:60: style: Parameter 'remote' can be declared as pointer to const [constParameterPointer] PingTunnel/ptunnel.c:1588:6: style: Variable 'syslog_levels' can be declared as const array [constVariable] PingTunnel/ptunnel.h:185:21: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] PingTunnel/ptunnel.c:629:13: style: Variable 'max_sock' is assigned a value that is never used. [unreadVariable] PingTunnel/ptunnel.c:944:12: style: Variable 'ip_pkt' is assigned a value that is never used. [unreadVariable] diff: head PingTunnel/ptunnel.c:124:17: style: Variable 'pwnam' can be declared as pointer to const [constVariablePointer] head PingTunnel/ptunnel.c:125:16: style: Variable 'grnam' can be declared as pointer to const [constVariablePointer] DONE