2025-11-24 04:37 ftp://ftp.de.debian.org/debian/pool/main/s/sucrack/sucrack_1.2.3.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-5.4.0-216-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.69 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 cppcheck: head 2.18.0 head-info: cb76e52 (2025-11-22 14:47:37 +0100) count: 69 69 elapsed-time: 0.2 0.4 head-timing-info: old-timing-info: head results: sucrack-1.2.3/src/dictionary.c:90:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/dictionary.c:126:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/pty.c:61:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/dictionary.c:256:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/rewriter.c:75:5: warning: If memory allocation fails, then there is a possible null pointer dereference: rule_set [nullPointerOutOfMemory] sucrack-1.2.3/src/rewriter.c:74:37: note: Assuming allocation function fails sucrack-1.2.3/src/rewriter.c:74:16: note: Assignment 'rule_set=(struct rule_set_t*)malloc(sizeof(struct rule_set_t))', assigned value is 0 sucrack-1.2.3/src/rewriter.c:75:5: note: Null pointer dereference sucrack-1.2.3/src/rewriter.c:76:5: warning: If memory allocation fails, then there is a possible null pointer dereference: rule_set [nullPointerOutOfMemory] sucrack-1.2.3/src/rewriter.c:74:37: note: Assuming allocation function fails sucrack-1.2.3/src/rewriter.c:74:16: note: Assignment 'rule_set=(struct rule_set_t*)malloc(sizeof(struct rule_set_t))', assigned value is 0 sucrack-1.2.3/src/rewriter.c:76:5: note: Null pointer dereference sucrack-1.2.3/src/rewriter.c:77:5: warning: If memory allocation fails, then there is a possible null pointer dereference: rule_set [nullPointerOutOfMemory] sucrack-1.2.3/src/rewriter.c:74:37: note: Assuming allocation function fails sucrack-1.2.3/src/rewriter.c:74:16: note: Assignment 'rule_set=(struct rule_set_t*)malloc(sizeof(struct rule_set_t))', assigned value is 0 sucrack-1.2.3/src/rewriter.c:77:5: note: Null pointer dereference sucrack-1.2.3/src/rewriter.c:55:9: style: Unused variable: s [unusedVariable] sucrack-1.2.3/src/rules.c:40:5: warning: If memory allocation fails, then there is a possible null pointer dereference: out [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:39:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:39:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:40:5: note: Null pointer dereference sucrack-1.2.3/src/rules.c:40:22: warning: If memory allocation fails, then there is a possible null pointer dereference: out [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:39:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:39:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:40:22: note: Null pointer dereference sucrack-1.2.3/src/rules.c:51:5: warning: If memory allocation fails, then there is a possible null pointer dereference: out [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:50:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:50:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:51:5: note: Null pointer dereference sucrack-1.2.3/src/rules.c:51:16: warning: If memory allocation fails, then there is a possible null pointer dereference: out [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:50:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:50:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:51:16: note: Null pointer dereference sucrack-1.2.3/src/rules.c:51:36: warning: If memory allocation fails, then there is a possible null pointer dereference: out [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:50:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:50:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:51:36: note: Null pointer dereference sucrack-1.2.3/src/rules.c:51:47: warning: If memory allocation fails, then there is a possible null pointer dereference: out [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:50:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:50:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:51:47: note: Null pointer dereference sucrack-1.2.3/src/rules.c:63:12: warning: If memory allocation fails, then there is a possible null pointer dereference: c [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:61:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:61:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:62:9: note: Assignment 'c=out', assigned value is 0 sucrack-1.2.3/src/rules.c:63:12: note: Null pointer dereference sucrack-1.2.3/src/rules.c:76:5: warning: If memory allocation fails, then there is a possible null pointer dereference: out [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:75:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:75:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:76:5: note: Null pointer dereference sucrack-1.2.3/src/rules.c:76:22: warning: If memory allocation fails, then there is a possible null pointer dereference: out [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:75:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:75:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:76:22: note: Null pointer dereference sucrack-1.2.3/src/rules.c:87:5: warning: If memory allocation fails, then there is a possible null pointer dereference: out [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:86:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:86:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:87:5: note: Null pointer dereference sucrack-1.2.3/src/rules.c:87:16: warning: If memory allocation fails, then there is a possible null pointer dereference: out [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:86:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:86:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:87:16: note: Null pointer dereference sucrack-1.2.3/src/rules.c:87:36: warning: If memory allocation fails, then there is a possible null pointer dereference: out [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:86:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:86:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:87:36: note: Null pointer dereference sucrack-1.2.3/src/rules.c:87:47: warning: If memory allocation fails, then there is a possible null pointer dereference: out [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:86:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:86:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:87:47: note: Null pointer dereference sucrack-1.2.3/src/rules.c:100:12: warning: If memory allocation fails, then there is a possible null pointer dereference: c [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:98:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:98:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:99:9: note: Assignment 'c=out', assigned value is 0 sucrack-1.2.3/src/rules.c:100:12: note: Null pointer dereference sucrack-1.2.3/src/rules.c:144:12: warning: If memory allocation fails, then there is a possible null pointer dereference: c [nullPointerOutOfMemory] sucrack-1.2.3/src/rules.c:141:17: note: Assuming allocation function fails sucrack-1.2.3/src/rules.c:141:17: note: Assignment 'out=strdup(in)', assigned value is 0 sucrack-1.2.3/src/rules.c:143:9: note: Assignment 'c=out', assigned value is 0 sucrack-1.2.3/src/rules.c:144:12: note: Null pointer dereference sucrack-1.2.3/src/dictionary.c:358:2: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] sucrack-1.2.3/src/dictionary.c:385:7: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] sucrack-1.2.3/src/dictionary.c:405:2: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] sucrack-1.2.3/src/rules.c:35:25: style: Parameter 'in' can be declared as pointer to const. However it seems that 'rules_first_upper' is a callback function, if 'in' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sucrack-1.2.3/src/rules.h:60:7: note: You might need to cast the function pointer here sucrack-1.2.3/src/rules.c:35:25: note: Parameter 'in' can be declared as pointer to const sucrack-1.2.3/src/rules.c:46:24: style: Parameter 'in' can be declared as pointer to const. However it seems that 'rules_last_upper' is a callback function, if 'in' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sucrack-1.2.3/src/rules.h:61:7: note: You might need to cast the function pointer here sucrack-1.2.3/src/rules.c:46:24: note: Parameter 'in' can be declared as pointer to const sucrack-1.2.3/src/rules.c:57:23: style: Parameter 'in' can be declared as pointer to const. However it seems that 'rules_all_upper' is a callback function, if 'in' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sucrack-1.2.3/src/rules.h:62:7: note: You might need to cast the function pointer here sucrack-1.2.3/src/rules.c:57:23: note: Parameter 'in' can be declared as pointer to const sucrack-1.2.3/src/rules.c:71:25: style: Parameter 'in' can be declared as pointer to const. However it seems that 'rules_first_lower' is a callback function, if 'in' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sucrack-1.2.3/src/rules.h:63:7: note: You might need to cast the function pointer here sucrack-1.2.3/src/rules.c:71:25: note: Parameter 'in' can be declared as pointer to const sucrack-1.2.3/src/rules.c:82:24: style: Parameter 'in' can be declared as pointer to const. However it seems that 'rules_last_lower' is a callback function, if 'in' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sucrack-1.2.3/src/rules.h:64:7: note: You might need to cast the function pointer here sucrack-1.2.3/src/rules.c:82:24: note: Parameter 'in' can be declared as pointer to const sucrack-1.2.3/src/rules.c:93:23: style: Parameter 'in' can be declared as pointer to const. However it seems that 'rules_all_lower' is a callback function, if 'in' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sucrack-1.2.3/src/rules.h:65:7: note: You might need to cast the function pointer here sucrack-1.2.3/src/rules.c:93:23: note: Parameter 'in' can be declared as pointer to const sucrack-1.2.3/src/rules.c:109:27: style: Parameter 'in' can be declared as pointer to const. However it seems that 'rules_prepend_digit' is a callback function, if 'in' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sucrack-1.2.3/src/rules.h:66:7: note: You might need to cast the function pointer here sucrack-1.2.3/src/rules.c:109:27: note: Parameter 'in' can be declared as pointer to const sucrack-1.2.3/src/rules.c:109:37: style: Parameter 'arg' can be declared as pointer to const. However it seems that 'rules_prepend_digit' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sucrack-1.2.3/src/rules.h:66:7: note: You might need to cast the function pointer here sucrack-1.2.3/src/rules.c:109:37: note: Parameter 'arg' can be declared as pointer to const sucrack-1.2.3/src/rules.c:123:26: style: Parameter 'in' can be declared as pointer to const. However it seems that 'rules_append_digit' is a callback function, if 'in' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sucrack-1.2.3/src/rules.h:67:7: note: You might need to cast the function pointer here sucrack-1.2.3/src/rules.c:123:26: note: Parameter 'in' can be declared as pointer to const sucrack-1.2.3/src/rules.c:123:36: style: Parameter 'arg' can be declared as pointer to const. However it seems that 'rules_append_digit' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sucrack-1.2.3/src/rules.h:67:7: note: You might need to cast the function pointer here sucrack-1.2.3/src/rules.c:123:36: note: Parameter 'arg' can be declared as pointer to const sucrack-1.2.3/src/rules.c:137:18: style: Parameter 'in' can be declared as pointer to const. However it seems that 'rules_1337' is a callback function, if 'in' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sucrack-1.2.3/src/rules.h:68:7: note: You might need to cast the function pointer here sucrack-1.2.3/src/rules.c:137:18: note: Parameter 'in' can be declared as pointer to const sucrack-1.2.3/src/stat.c:151:5: warning: %i in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sucrack-1.2.3/src/dictionary.c:96:2: error: Resource leak: fd [resourceLeak] sucrack-1.2.3/src/stat.c:151:5: warning: %i in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sucrack-1.2.3/src/dictionary.c:148:2: warning: If memory allocation fails, then there is a possible null pointer dereference: dict_buffer [nullPointerOutOfMemory] sucrack-1.2.3/src/dictionary.c:145:35: note: Assuming allocation function fails sucrack-1.2.3/src/dictionary.c:145:19: note: Assignment 'dict_buffer=(char**)malloc(sizeof(char*)*size)', assigned value is 0 sucrack-1.2.3/src/dictionary.c:148:2: note: Null pointer dereference sucrack-1.2.3/src/dictionary.c:262:16: warning: If memory allocation fails, then there is a possible null pointer dereference: w [nullPointerOutOfMemory] sucrack-1.2.3/src/dictionary.c:261:15: note: Assuming allocation function fails sucrack-1.2.3/src/dictionary.c:261:15: note: Assignment 'w=strdup(word)', assigned value is 0 sucrack-1.2.3/src/dictionary.c:262:16: note: Null pointer dereference sucrack-1.2.3/src/dictionary.c:83:17: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] sucrack-1.2.3/src/dictionary.c:247:21: style: Parameter 'word' can be declared as pointer to const [constParameterPointer] sucrack-1.2.3/src/dictionary.c:402:16: style: Parameter 'args' can be declared as pointer to const. However it seems that 'dict_run' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] sucrack-1.2.3/src/dictionary.c:177:41: note: You might need to cast the function pointer here sucrack-1.2.3/src/dictionary.c:402:16: note: Parameter 'args' can be declared as pointer to const sucrack-1.2.3/src/dictionary.c:356:10: style: Variable 'then' is assigned a value that is never used. [unreadVariable] sucrack-1.2.3/src/dictionary.c:383:12: style: Variable 'then' is assigned a value that is never used. [unreadVariable] sucrack-1.2.3/src/util.c:49:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ICANON [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/util.c:62:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TCSANOW [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/su.c:60:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pollfd [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/su.c:141:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/su.c:191:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/sucrack.c:57:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SUCRACK_TITLE [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/sucrack.c:158:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/worker.c:60:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/worker.c:106:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sucrack-1.2.3/src/worker.c:169:6: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] sucrack-1.2.3/src/worker.c:49:28: style:inconclusive: Function 'worker_init' argument 1 names different: declaration 'wnum' definition 'num'. [funcArgNamesDifferent] sucrack-1.2.3/src/worker.h:45:32: note: Function 'worker_init' argument 1 names different: declaration 'wnum' definition 'num'. sucrack-1.2.3/src/worker.c:49:28: note: Function 'worker_init' argument 1 names different: declaration 'wnum' definition 'num'. sucrack-1.2.3/src/worker.c:159:7: style: Variable 'then' is assigned a value that is never used. [unreadVariable] sucrack-1.2.3/src/worker.c:174:5: style: Variable 'rs' is assigned a value that is never used. [unreadVariable] sucrack-1.2.3/src/su.c:115:11: style: Obsolescent function 'vfork' called. It is recommended to use 'fork' instead. [prohibitedvforkCalled] sucrack-1.2.3/src/su.c:138:2: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] sucrack-1.2.3/src/su.c:80:8: error: Common realloc mistake: 'tbuf' nulled but not freed upon failure [memleakOnRealloc] sucrack-1.2.3/src/su.c:68:5: warning: If memory allocation fails, then there is a possible null pointer dereference: tbuf [nullPointerOutOfMemory] sucrack-1.2.3/src/su.c:67:27: note: Assuming allocation function fails sucrack-1.2.3/src/su.c:67:12: note: Assignment 'tbuf=(char*)malloc(tlen)', assigned value is 0 sucrack-1.2.3/src/su.c:68:5: note: Null pointer dereference sucrack-1.2.3/src/sucrack.c:55:13: style: Parameter 'path' can be declared as pointer to const [constParameterPointer] sucrack-1.2.3/src/su.c:108:11: style: Variable 'resp' can be declared as pointer to const [constVariablePointer] sucrack-1.2.3/src/sucrack.c:108:19: style: Variable 'user' can be declared as pointer to const [constVariablePointer] sucrack-1.2.3/src/su.c:167:15: style: Parameter 'user' can be declared as pointer to const [constParameterPointer] sucrack-1.2.3/src/su.c:170:11: style: Variable 'path' can be declared as pointer to const [constVariablePointer] diff: DONE