2025-11-27 07:26 ftp://ftp.de.debian.org/debian/pool/main/j/jailkit/jailkit_2.23.orig.tar.bz2 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: 9486fde (2025-11-26 08:20:02 +0100) count: 58 58 elapsed-time: 0.5 0.5 head-timing-info: old-timing-info: head results: jailkit-2.23/src/jk_chrootlaunch.c:173:19: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] jailkit-2.23/src/jk_chrootsh.c:280:60: error: There is an unknown macro here somewhere. Configuration is required. If INIPREFIX is a macro then please configure it. [unknownMacro] jailkit-2.23/src/jk_lsh.c:195:41: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] jailkit-2.23/src/jk_lib.c:52:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] jailkit-2.23/src/jk_lib.c:114:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] jailkit-2.23/src/jk_procmailwrapper.c:82:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] jailkit-2.23/src/jk_socketd.c:234:31: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] jailkit-2.23/src/jk_uchroot.c:85:19: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] jailkit-2.23/src/jk_procmailwrapper.c:77:7: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] jailkit-2.23/src/jk_procmailwrapper.c:129:7: portability: Non reentrant function 'getgrgid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrgid_r'. [prohibitedgetgrgidCalled] jailkit-2.23/src/jk_procmailwrapper.c:217:8: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] jailkit-2.23/src/jk_procmailwrapper.c:218:8: portability: Non reentrant function 'getgrgid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrgid_r'. [prohibitedgetgrgidCalled] jailkit-2.23/src/jk_procmailwrapper.c:158:23: warning: If memory allocation fails, then there is a possible null pointer dereference: test [nullPointerOutOfMemory] jailkit-2.23/src/jk_procmailwrapper.c:157:36: note: Assuming allocation function fails jailkit-2.23/src/jk_procmailwrapper.c:157:36: note: Assignment 'test=get_current_dir_name()', assigned value is 0 jailkit-2.23/src/jk_procmailwrapper.c:158:23: note: Null pointer dereference jailkit-2.23/src/jk_procmailwrapper.c:258:7: style: Local variable 'i' shadows outer variable [shadowVariable] jailkit-2.23/src/jk_procmailwrapper.c:71:6: note: Shadowed declaration jailkit-2.23/src/jk_procmailwrapper.c:258:7: note: Shadow variable jailkit-2.23/src/jk_procmailwrapper.c:57:8: style: Variable 'tmp' can be declared as pointer to const [constVariablePointer] jailkit-2.23/src/jk_procmailwrapper.c:65:24: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] jailkit-2.23/src/jk_procmailwrapper.c:104:9: style: Variable 'tmp' can be declared as pointer to const [constVariablePointer] jailkit-2.23/src/jk_lib.c:203:23: style: Array index 'numstartspaces' is used before limits check. [arrayIndexThenCheck] jailkit-2.23/src/passwdparsertester.c:7:17: style: Variable 'pw1' can be declared as pointer to const [constVariablePointer] jailkit-2.23/src/jk_lib.c:75:2: warning: If memory allocation fails, then there is a possible null pointer dereference: retval [nullPointerOutOfMemory] jailkit-2.23/src/jk_lib.c:74:17: note: Assuming allocation function fails jailkit-2.23/src/jk_lib.c:74:17: note: Assignment 'retval=malloc(reqsize*sizeof(char))', assigned value is 0 jailkit-2.23/src/jk_lib.c:75:2: note: Null pointer dereference jailkit-2.23/src/jk_lib.c:202:44: warning: If memory allocation fails, then there is a possible null pointer dereference: string [nullPointerOutOfMemory] jailkit-2.23/src/jk_lib.c:236:35: note: Assuming allocation function fails jailkit-2.23/src/jk_lib.c:236:35: note: Calling function 'strip_string', 1st argument 'strndup(tmp,tmp2-tmp)' value is 0 jailkit-2.23/src/jk_lib.c:202:44: note: Null pointer dereference jailkit-2.23/src/jk_lib.c:203:17: warning: If memory allocation fails, then there is a possible null pointer dereference: string [nullPointerOutOfMemory] jailkit-2.23/src/jk_lib.c:236:35: note: Assuming allocation function fails jailkit-2.23/src/jk_lib.c:236:35: note: Calling function 'strip_string', 1st argument 'strndup(tmp,tmp2-tmp)' value is 0 jailkit-2.23/src/jk_lib.c:203:17: note: Null pointer dereference jailkit-2.23/src/jk_lib.c:205:17: warning: If memory allocation fails, then there is a possible null pointer dereference: string [nullPointerOutOfMemory] jailkit-2.23/src/jk_lib.c:236:35: note: Assuming allocation function fails jailkit-2.23/src/jk_lib.c:236:35: note: Calling function 'strip_string', 1st argument 'strndup(tmp,tmp2-tmp)' value is 0 jailkit-2.23/src/jk_lib.c:205:17: note: Null pointer dereference jailkit-2.23/src/jk_lib.c:209:2: warning: If memory allocation fails, then there is a possible null pointer dereference: string [nullPointerOutOfMemory] jailkit-2.23/src/jk_lib.c:236:35: note: Assuming allocation function fails jailkit-2.23/src/jk_lib.c:236:35: note: Calling function 'strip_string', 1st argument 'strndup(tmp,tmp2-tmp)' value is 0 jailkit-2.23/src/jk_lib.c:209:2: note: Null pointer dereference jailkit-2.23/src/jk_lib.c:240:14: warning: If memory allocation fails, then there is a possible null pointer dereference: arr [nullPointerOutOfMemory] jailkit-2.23/src/jk_lib.c:229:14: note: Assuming allocation function fails jailkit-2.23/src/jk_lib.c:229:14: note: Assignment 'arr=malloc(size)', assigned value is 0 jailkit-2.23/src/jk_lib.c:240:14: note: Null pointer dereference jailkit-2.23/src/jk_lib.c:248:2: warning: If memory allocation fails, then there is a possible null pointer dereference: arr [nullPointerOutOfMemory] jailkit-2.23/src/jk_lib.c:229:14: note: Assuming allocation function fails jailkit-2.23/src/jk_lib.c:229:14: note: Assignment 'arr=malloc(size)', assigned value is 0 jailkit-2.23/src/jk_lib.c:248:2: note: Null pointer dereference jailkit-2.23/src/jk_lib.c:152:13: style: The comparison 'retval == 1' is always true. [knownConditionTrueFalse] jailkit-2.23/src/jk_lib.c:146:15: note: 'retval' is assigned value '1' here. jailkit-2.23/src/jk_lib.c:152:13: note: The comparison 'retval == 1' is always true. jailkit-2.23/src/utils.c:64:13: style: Array index 'i' is used before limits check. [arrayIndexThenCheck] jailkit-2.23/src/utils.c:74:13: portability: 'dest' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] jailkit-2.23/src/passwdparser.c:99:2: style: Obsolescent function 'bzero' called. It is recommended to use 'memset' instead. [prohibitedbzeroCalled] jailkit-2.23/src/passwdparser.c:155:18: style: Variable 'line' can be declared as pointer to const [constVariablePointer] jailkit-2.23/src/iniparser.c:148:9: warning: Opposite inner 'if' condition leads to a dead code block. [oppositeInnerCondition] jailkit-2.23/src/iniparser.c:146:7: note: outer condition: !inSection jailkit-2.23/src/iniparser.c:148:9: note: opposite inner condition: inSection jailkit-2.23/src/iniparser.c:199:14: style: Condition 'foundKey' is always true [knownConditionTrueFalse] jailkit-2.23/src/iniparser.c:177:14: note: Assuming that condition '!foundKey' is not redundant jailkit-2.23/src/iniparser.c:199:14: note: Condition 'foundKey' is always true jailkit-2.23/src/iniparser.c:232:2: warning: %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] jailkit-2.23/src/iniparser.c:244:2: warning: %o in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] jailkit-2.23/src/iniparser.c:52:3: warning: If memory allocation fails, then there is a possible null pointer dereference: ip [nullPointerOutOfMemory] jailkit-2.23/src/iniparser.c:51:26: note: Assuming allocation function fails jailkit-2.23/src/iniparser.c:51:26: note: Assignment 'ip=malloc(sizeof(struct Tiniparser))', assigned value is 0 jailkit-2.23/src/iniparser.c:52:3: note: Null pointer dereference jailkit-2.23/src/iniparser.c:53:3: warning: If memory allocation fails, then there is a possible null pointer dereference: ip [nullPointerOutOfMemory] jailkit-2.23/src/iniparser.c:51:26: note: Assuming allocation function fails jailkit-2.23/src/iniparser.c:51:26: note: Assignment 'ip=malloc(sizeof(struct Tiniparser))', assigned value is 0 jailkit-2.23/src/iniparser.c:53:3: note: Null pointer dereference jailkit-2.23/src/iniparser.c:56:16: warning: If memory allocation fails, then there is a possible null pointer dereference: ip [nullPointerOutOfMemory] jailkit-2.23/src/iniparser.c:51:26: note: Assuming allocation function fails jailkit-2.23/src/iniparser.c:51:26: note: Assignment 'ip=malloc(sizeof(struct Tiniparser))', assigned value is 0 jailkit-2.23/src/iniparser.c:56:16: note: Null pointer dereference jailkit-2.23/src/iniparser.c:47:33: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] jailkit-2.23/src/iniparser.c:107:21: style: Variable 'found' can be declared as pointer to const [constVariablePointer] jailkit-2.23/src/iniparser.c:121:22: style: Variable 'prevch' is assigned a value that is never used. [unreadVariable] jailkit-2.23/src/iniparser.c:217:10: style: Variable 'prevch' is assigned a value that is never used. [unreadVariable] jailkit-2.23/src/wordexp.c:331:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GLOB_NOSPACE [valueFlowBailoutIncompleteVar] jailkit-2.23/src/wordexp.c:752:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _PATH_BSHELL [valueFlowBailoutIncompleteVar] jailkit-2.23/src/wordexp.c:1402:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FNM_NOMATCH [valueFlowBailoutIncompleteVar] jailkit-2.23/src/wordexp.c:286:10: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] jailkit-2.23/src/wordexp.c:302:10: portability: Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. [prohibitedgetpwnamCalled] jailkit-2.23/src/wordexp.c:782:11: warning: Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead. [allocaCalled] jailkit-2.23/src/wordexp.c:1876:27: style:inconclusive: Function 'wordfree' argument 1 names different: declaration '__wordexp' definition 'pwordexp'. [funcArgNamesDifferent] jailkit-2.23/src/wordexp.h:65:34: note: Function 'wordfree' argument 1 names different: declaration '__wordexp' definition 'pwordexp'. jailkit-2.23/src/wordexp.c:1876:27: note: Function 'wordfree' argument 1 names different: declaration '__wordexp' definition 'pwordexp'. jailkit-2.23/src/wordexp.c:1895:25: style:inconclusive: Function 'wordexp' argument 1 names different: declaration '__words' definition 'words'. [funcArgNamesDifferent] jailkit-2.23/src/wordexp.h:61:46: note: Function 'wordexp' argument 1 names different: declaration '__words' definition 'words'. jailkit-2.23/src/wordexp.c:1895:25: note: Function 'wordexp' argument 1 names different: declaration '__words' definition 'words'. jailkit-2.23/src/wordexp.c:1895:44: style:inconclusive: Function 'wordexp' argument 2 names different: declaration '__pwordexp' definition 'pwordexp'. [funcArgNamesDifferent] jailkit-2.23/src/wordexp.h:62:27: note: Function 'wordexp' argument 2 names different: declaration '__pwordexp' definition 'pwordexp'. jailkit-2.23/src/wordexp.c:1895:44: note: Function 'wordexp' argument 2 names different: declaration '__pwordexp' definition 'pwordexp'. jailkit-2.23/src/wordexp.c:1895:58: style:inconclusive: Function 'wordexp' argument 3 names different: declaration '__flags' definition 'flags'. [funcArgNamesDifferent] jailkit-2.23/src/wordexp.h:62:43: note: Function 'wordexp' argument 3 names different: declaration '__flags' definition 'flags'. jailkit-2.23/src/wordexp.c:1895:58: note: Function 'wordexp' argument 3 names different: declaration '__flags' definition 'flags'. jailkit-2.23/src/wordexp.c:1287:8: style: Local variable 'quoted' shadows outer argument [shadowArgument] jailkit-2.23/src/wordexp.c:955:32: note: Shadowed declaration jailkit-2.23/src/wordexp.c:1287:8: note: Shadow variable jailkit-2.23/src/wordexp.c:1291:12: style: Local variable 'offset' shadows outer argument [shadowArgument] jailkit-2.23/src/wordexp.c:954:14: note: Shadowed declaration jailkit-2.23/src/wordexp.c:1291:12: note: Shadow variable jailkit-2.23/src/wordexp.c:278:18: style: Variable 'tpwd' can be declared as pointer to const [constVariablePointer] jailkit-2.23/src/wordexp.c:299:9: style: Variable 'user' can be declared as pointer to const [constVariablePointer] jailkit-2.23/src/wordexp.c:300:18: style: Variable 'tpwd' can be declared as pointer to const [constVariablePointer] jailkit-2.23/src/wordexp.c:1944:9: style: Variable 'ifsch' can be declared as pointer to const [constVariablePointer] diff: DONE