2025-05-08 01:23 ftp://ftp.de.debian.org/debian/pool/main/s/sipgrep/sipgrep_2.2.0.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 -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: ebc80c0 (2025-05-07 18:59:31 +0200) count: 165 165 elapsed-time: 2.7 2.7 head-timing-info: old-timing-info: head results: sipgrep-2.2.0/src/log.c:53:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/log.c:34:21: style: Parameter '_prgname' can be declared as pointer to const [constParameterPointer] sipgrep-2.2.0/src/ipreasm.c:244:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable id [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/ipreasm.c:329:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/ipreasm.c:673:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IP_MF [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/ipreasm.c:340:7: style: Redundant initialization for 'next'. The initialized value is overwritten before it is read. [redundantInitialization] sipgrep-2.2.0/src/ipreasm.c:336:53: note: next is initialized sipgrep-2.2.0/src/ipreasm.c:340:7: note: next is overwritten sipgrep-2.2.0/src/ipreasm.c:336:48: style: Variable 'next' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/ipreasm.c:410:37: style: Parameter 'entry' can be declared as pointer to const [constParameterPointer] sipgrep-2.2.0/src/ipreasm.c:666:13: style: Variable 'ip_header' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/ipreasm.c:65:23: style: union member 'reasm_id::ipv6' is never used. [unusedStructMember] sipgrep-2.2.0/src/tcpreasm.c:227:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable len [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/tcpreasm.c:325:6: style: Condition '!add_fragment_tcp(entry,frag,last_frag)' is always false [knownConditionTrueFalse] sipgrep-2.2.0/src/tcpreasm.c:325:24: note: Calling function 'add_fragment_tcp' returns 1 sipgrep-2.2.0/src/tcpreasm.c:325:6: note: Condition '!add_fragment_tcp(entry,frag,last_frag)' is always false sipgrep-2.2.0/src/tcpreasm.c:246:10: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/tcpreasm.c:366:7: style: Redundant initialization for 'next'. The initialized value is overwritten before it is read. [redundantInitialization] sipgrep-2.2.0/src/tcpreasm.c:361:56: note: next is initialized sipgrep-2.2.0/src/tcpreasm.c:366:7: note: next is overwritten sipgrep-2.2.0/src/tcpreasm.c:211:155: style: Parameter 'ip_src' can be declared as pointer to const [constParameterPointer] sipgrep-2.2.0/src/tcpreasm.c:211:179: style: Parameter 'ip_dst' can be declared as pointer to const [constParameterPointer] sipgrep-2.2.0/src/tcpreasm.c:361:51: style: Variable 'next' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/tcpreasm.c:403:40: style: Parameter 'entry' can be declared as pointer to const [constParameterPointer] sipgrep-2.2.0/src/tcpreasm.c:325:38: error: Uninitialized variable: last_frag [uninitvar] sipgrep-2.2.0/src/tcpreasm.c:64:10: style: struct member 'tcpreasm_id_ipv6::ip_src' is never used. [unusedStructMember] sipgrep-2.2.0/src/tcpreasm.c:64:22: style: struct member 'tcpreasm_id_ipv6::ip_dst' is never used. [unusedStructMember] sipgrep-2.2.0/src/tcpreasm.c:65:11: style: struct member 'tcpreasm_id_ipv6::ip_id' is never used. [unusedStructMember] sipgrep-2.2.0/src/tcpreasm.c:66:11: style: struct member 'tcpreasm_id_ipv6::sport' is never used. [unusedStructMember] sipgrep-2.2.0/src/tcpreasm.c:67:11: style: struct member 'tcpreasm_id_ipv6::dport' is never used. [unusedStructMember] sipgrep-2.2.0/src/tcpreasm.c:73:26: style: union member 'tcpreasm_id::ipv6' is never used. [unusedStructMember] sipgrep-2.2.0/src/tcpreasm.c:366:7: style: Variable 'next' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/transport_hep.c:76:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/transport_hep.c:257:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AI_NUMERICSERV [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/transport_hep.c:156:21: style: Condition 'capt_password!=NULL' is always false [knownConditionTrueFalse] sipgrep-2.2.0/src/transport_hep.c:54:25: note: Assignment 'capt_password=NULL', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:156:21: note: Condition 'capt_password!=NULL' is always false sipgrep-2.2.0/src/transport_hep.c:225:7: style: Condition 'buffer' is always true [knownConditionTrueFalse] sipgrep-2.2.0/src/transport_hep.c:270:5: error: Memory leak: ai [memleak] sipgrep-2.2.0/src/transport_hep.c:276:7: error: Memory leak: ai [memleak] sipgrep-2.2.0/src/transport_hep.c:279:3: error: Memory leak: ai [memleak] sipgrep-2.2.0/src/transport_hep.c:57:11: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:57:11: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:60:11: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:60:11: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:63:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:63:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:64:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:64:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:65:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:65:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:66:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:66:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:69:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:69:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:70:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:70:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:71:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:71:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:72:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:72:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:111:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:111:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:112:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:112:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:113:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:113:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:114:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:114:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:117:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:117:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:118:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:118:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:119:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:119:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:120:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:120:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:124:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:124:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:125:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:125:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:126:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:126:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:127:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:127:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:131:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:131:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:132:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:132:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:133:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:133:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:134:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:134:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:137:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:137:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:138:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:138:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:139:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:139:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:140:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:140:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:143:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:143:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:144:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:144:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:145:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:145:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:146:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:146:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:167:3: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:167:3: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:176:28: warning: If memory allocation fails, then there is a possible null pointer dereference: hg [nullPointerOutOfMemory] sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assuming allocation function fails sipgrep-2.2.0/src/transport_hep.c:56:15: note: Assignment 'hg=malloc(sizeof(struct hep_generic))', assigned value is 0 sipgrep-2.2.0/src/transport_hep.c:170:14: note: Assuming condition is false sipgrep-2.2.0/src/transport_hep.c:176:28: note: Null pointer dereference sipgrep-2.2.0/src/transport_hep.c:41:29: style: Parameter 'rcinfo' can be declared as pointer to const [constParameterPointer] sipgrep-2.2.0/src/transport_hep.c:41:52: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] sipgrep-2.2.0/src/transport_hep.c:54:9: style: Variable 'capt_password' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/transport_hep.c:233:30: style: Parameter 'url' can be declared as pointer to const [constParameterPointer] sipgrep-2.2.0/src/transport_hep.c:236:14: style: Variable 'tmp' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/transport_hep.c:182:29: portability: '(void*)buffer' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] sipgrep-2.2.0/src/transport_hep.c:185:29: portability: '(void*)buffer' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] sipgrep-2.2.0/src/transport_hep.c:203:29: portability: '(void*)buffer' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] sipgrep-2.2.0/src/transport_hep.c:207:29: portability: '(void*)buffer' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] sipgrep-2.2.0/src/transport_hep.c:212:27: portability: '(void*)buffer' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] sipgrep-2.2.0/src/transport_hep.c:216:27: portability: '(void*)buffer' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] sipgrep-2.2.0/src/transport_hep.c:203:39: error: Uninitialized variable: &authkey_chunk [uninitvar] sipgrep-2.2.0/src/sipgrep.c:245:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:711:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:768:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INET6_ADDRSTRLEN [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:1110:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable next [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:1202:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:1980:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable dump_delay [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:2018:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TIOCGWINSZ [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:2124:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable VERSION [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:2134:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_IGN [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:2178:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable next [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:2194:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable next [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:2210:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable next [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:2332:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable next [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:2353:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipgrep.c:2405:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET [valueFlowBailoutIncompleteVar] sipgrep-2.2.0/src/sipparse.c:73:13: warning: If memory allocation fails, then there is a possible null pointer dereference: new_message [nullPointerOutOfMemory] sipgrep-2.2.0/src/sipparse.c:72:26: note: Assuming allocation function fails sipgrep-2.2.0/src/sipparse.c:72:26: note: Assignment 'new_message=malloc(new_len)', assigned value is 0 sipgrep-2.2.0/src/sipparse.c:73:13: note: Null pointer dereference sipgrep-2.2.0/src/sipparse.c:90:11: warning: If memory allocation fails, then there is a possible null pointer dereference: c [nullPointerOutOfMemory] sipgrep-2.2.0/src/sipparse.c:72:26: note: Assuming allocation function fails sipgrep-2.2.0/src/sipparse.c:72:26: note: Assignment 'new_message=malloc(new_len)', assigned value is 0 sipgrep-2.2.0/src/sipparse.c:81:7: note: Assignment 'c=new_message', assigned value is 0 sipgrep-2.2.0/src/sipparse.c:90:11: note: Null pointer dereference sipgrep-2.2.0/src/sipparse.c:214:68: style: Same expression on both sides of '||'. [duplicateExpression] sipgrep-2.2.0/src/sipparse.c:58:31: style:inconclusive: Function 'parse_message' argument 1 names different: declaration 'body' definition 'message'. [funcArgNamesDifferent] sipgrep-2.2.0/src/include/sipparse.h:132:34: note: Function 'parse_message' argument 1 names different: declaration 'body' definition 'message'. sipgrep-2.2.0/src/sipparse.c:58:31: note: Function 'parse_message' argument 1 names different: declaration 'body' definition 'message'. sipgrep-2.2.0/src/sipparse.c:160:22: style: Local variable 'c' shadows outer variable [shadowVariable] sipgrep-2.2.0/src/sipparse.c:78:18: note: Shadowed declaration sipgrep-2.2.0/src/sipparse.c:160:22: note: Shadow variable sipgrep-2.2.0/src/sipparse.c:299:17: style: Local variable 'c' shadows outer variable [shadowVariable] sipgrep-2.2.0/src/sipparse.c:78:18: note: Shadowed declaration sipgrep-2.2.0/src/sipparse.c:299:17: note: Shadow variable sipgrep-2.2.0/src/sipparse.c:36:9: style: Variable 'end' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/sipparse.c:79:24: style: Variable 'pch' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/sipparse.c:109:8: style: Variable 'sip20' can be declared as const array [constVariable] sipgrep-2.2.0/src/sipparse.c:77:37: style: Variable 'cut' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipparse.c:82:15: style: Variable 'last_offset' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipparse.c:212:6: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipparse.c:216:6: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipparse.c:224:6: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipparse.c:286:6: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipparse.c:350:20: style: Variable 'header_offset' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipparse.c:355:37: style: Variable 'last_offset' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipgrep.c:720:9: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] sipgrep-2.2.0/src/sipgrep.c:1952:18: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] sipgrep-2.2.0/src/sipgrep.c:2002:3: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] sipgrep-2.2.0/src/sipgrep.c:2195:9: style: Condition 's' is always true [knownConditionTrueFalse] sipgrep-2.2.0/src/sipgrep.c:736:7: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:891:22: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:1109:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:1109:2: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:1138:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:1261:23: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:1277:27: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2243:7: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2246:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2247:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2250:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2256:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2257:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2263:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2266:7: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2284:7: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2287:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2294:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2297:7: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sipgrep-2.2.0/src/sipgrep.c:2357:5: error: Resource leak: s [resourceLeak] sipgrep-2.2.0/src/sipgrep.c:786:13: warning: If memory allocation fails, then there is a possible null pointer dereference: new_p [nullPointerOutOfMemory] sipgrep-2.2.0/src/sipgrep.c:785:28: note: Assuming allocation function fails sipgrep-2.2.0/src/sipgrep.c:785:28: note: Assignment 'new_p=malloc(len-link_offset-((ntohs((uint16_t)*(p+12))==0x8100)?4:0))', assigned value is 0 sipgrep-2.2.0/src/sipgrep.c:786:13: note: Null pointer dereference sipgrep-2.2.0/src/sipgrep.c:873:11: warning: If memory allocation fails, then there is a possible null pointer dereference: new_p_2 [nullPointerOutOfMemory] sipgrep-2.2.0/src/sipgrep.c:872:28: note: Assuming allocation function fails sipgrep-2.2.0/src/sipgrep.c:872:28: note: Assignment 'new_p_2=malloc(len+10)', assigned value is 0 sipgrep-2.2.0/src/sipgrep.c:873:11: note: Null pointer dereference sipgrep-2.2.0/src/sipgrep.c:579:18: style: Checking if unsigned expression 'err_code' is less than zero. [unsignedLessThanZero] sipgrep-2.2.0/src/sipgrep.c:1665:21: style: Local variable 'match_data' shadows outer variable [shadowVariable] sipgrep-2.2.0/src/sipgrep.c:163:12: note: Shadowed declaration sipgrep-2.2.0/src/sipgrep.c:1665:21: note: Shadow variable sipgrep-2.2.0/src/sipgrep.c:1901:16: style: Local variable 'to' shadows outer variable [shadowVariable] sipgrep-2.2.0/src/sipgrep.c:127:58: note: Shadowed declaration sipgrep-2.2.0/src/sipgrep.c:1901:16: note: Shadow variable sipgrep-2.2.0/src/sipgrep.c:696:14: style: Variable 't' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/sipgrep.c:698:9: style: Variable 'file_ext' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/sipgrep.c:1004:27: style: Parameter 'request' can be declared as pointer to const [constParameterPointer] sipgrep-2.2.0/src/sipgrep.c:1026:28: style: Parameter 'request' can be declared as pointer to const [constParameterPointer] sipgrep-2.2.0/src/sipgrep.c:1156:14: style: Variable 'rcinfo' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/sipgrep.c:1698:34: style: Parameter 'data' can be declared as pointer to const. However it seems that 'blank_match_func' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sipgrep-2.2.0/src/sipgrep.c:166:28: note: You might need to cast the function pointer here sipgrep-2.2.0/src/sipgrep.c:1698:34: note: Parameter 'data' can be declared as pointer to const sipgrep-2.2.0/src/sipgrep.c:1714:11: style: Variable 'color' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/sipgrep.c:1901:9: style: Variable 'from' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/sipgrep.c:1934:9: style: Variable 's' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/sipgrep.c:1950:42: style: Parameter 'h' can be declared as pointer to const. However it seems that 'print_time_absolute' is a callback function, if 'h' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sipgrep-2.2.0/src/sipgrep.c:240:17: note: You might need to cast the function pointer here sipgrep-2.2.0/src/sipgrep.c:1950:42: note: Parameter 'h' can be declared as pointer to const sipgrep-2.2.0/src/sipgrep.c:1952:14: style: Variable 't' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/sipgrep.c:2373:34: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] sipgrep-2.2.0/src/sipgrep.c:2376:9: style: Variable 'pch' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/sipgrep.c:2376:15: style: Variable 'ports' can be declared as pointer to const [constVariablePointer] sipgrep-2.2.0/src/sipgrep.c:699:20: style: Variable 'len' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipgrep.c:1587:22: style: Variable 'total_bytes_parsed' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipgrep.c:1156:14: style: Variable 'rcinfo' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipgrep.c:1712:16: style: Variable 'offset' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipgrep.c:1712:26: style: Variable 'left' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipgrep.c:1737:17: style: Variable 'left' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipgrep.c:1828:23: style: Variable 'j' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipgrep.c:2378:18: style: Variable 'start_port' is assigned a value that is never used. [unreadVariable] sipgrep-2.2.0/src/sipgrep.c:2378:41: style: Variable 'st' is assigned a value that is never used. [unreadVariable] diff: DONE