2025-07-12 13:31 ftp://ftp.de.debian.org/debian/pool/main/a/asmail/asmail_2.1.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=openssl --library=motif --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 -j6 platform: Linux-6.1.0-37-amd64-x86_64-with-glibc2.36 python: 3.11.2 client-version: 1.3.67 compiler: g++ (Debian 12.2.0-14+deb12u1) 12.2.0 cppcheck: head 2.17.0 head-info: 843f95e (2025-07-12 14:37:40 +0200) count: 114 117 elapsed-time: 1.1 1.1 head-timing-info: old-timing-info: head results: asmail-2.1/globals.c:38:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CLOCK_REALTIME [valueFlowBailoutIncompleteVar] asmail-2.1/globals.c:77:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ETIMEDOUT [valueFlowBailoutIncompleteVar] asmail-2.1/maildir.c:13:18: style: Variable 'f' can be declared as pointer to const [constVariablePointer] asmail-2.1/mh.c:19:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] asmail-2.1/mh.c:165:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] asmail-2.1/imap.c:136:4: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] asmail-2.1/imap.c:143:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] asmail-2.1/imap.c:168:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] asmail-2.1/imap.c:184:3: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] asmail-2.1/imap.c:189:3: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] asmail-2.1/imap.c:201:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] asmail-2.1/imap.c:207:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] asmail-2.1/imap.c:217:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] asmail-2.1/imap.c:244:4: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] asmail-2.1/imap.c:157:9: style: Variable 'tmp_str' can be declared as pointer to const [constVariablePointer] asmail-2.1/gui.c:137:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XpmCloseness [valueFlowBailoutIncompleteVar] asmail-2.1/gui.c:155:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XpmCloseness [valueFlowBailoutIncompleteVar] asmail-2.1/gui.c:215:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ShapeBounding [valueFlowBailoutIncompleteVar] asmail-2.1/gui.c:255:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable None [valueFlowBailoutIncompleteVar] asmail-2.1/gui.c:529:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EBUSY [valueFlowBailoutIncompleteVar] asmail-2.1/socklib.c:132:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_GETFL [valueFlowBailoutIncompleteVar] asmail-2.1/asmail.c:60:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] asmail-2.1/asmail.c:690:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENOENT [valueFlowBailoutIncompleteVar] asmail-2.1/socklib.c:115:24: style: Obsolescent function 'gethostbyname' called. It is recommended to use 'getaddrinfo' instead. [prohibitedgethostbynameCalled] asmail-2.1/socklib.c:154:19: style: Obsolescent function 'gethostbyname' called. It is recommended to use 'getaddrinfo' instead. [prohibitedgethostbynameCalled] asmail-2.1/socklib.c:151:31: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] asmail-2.1/socklib.c:275:29: style: Parameter 'string' can be declared as pointer to const [constParameterPointer] asmail-2.1/gui.c:137:3: warning: If memory allocation fails, then there is a possible null pointer dereference: icon [nullPointerOutOfMemory] asmail-2.1/gui.c:136:35: note: Assuming allocation function fails asmail-2.1/gui.c:136:10: note: Assignment 'icon=(struct XpmIcon*)calloc(1,sizeof(struct XpmIcon))', assigned value is 0 asmail-2.1/gui.c:137:3: note: Null pointer dereference asmail-2.1/gui.c:138:3: warning: If memory allocation fails, then there is a possible null pointer dereference: icon [nullPointerOutOfMemory] asmail-2.1/gui.c:136:35: note: Assuming allocation function fails asmail-2.1/gui.c:136:10: note: Assignment 'icon=(struct XpmIcon*)calloc(1,sizeof(struct XpmIcon))', assigned value is 0 asmail-2.1/gui.c:138:3: note: Null pointer dereference asmail-2.1/gui.c:145:3: warning: If memory allocation fails, then there is a possible null pointer dereference: icon [nullPointerOutOfMemory] asmail-2.1/gui.c:136:35: note: Assuming allocation function fails asmail-2.1/gui.c:136:10: note: Assignment 'icon=(struct XpmIcon*)calloc(1,sizeof(struct XpmIcon))', assigned value is 0 asmail-2.1/gui.c:145:3: note: Null pointer dereference asmail-2.1/gui.c:155:2: warning: If memory allocation fails, then there is a possible null pointer dereference: icon [nullPointerOutOfMemory] asmail-2.1/gui.c:153:28: note: Assuming allocation function fails asmail-2.1/gui.c:153:3: note: Assignment 'icon=(struct XpmIcon*)calloc(1,sizeof(struct XpmIcon))', assigned value is 0 asmail-2.1/gui.c:155:2: note: Null pointer dereference asmail-2.1/gui.c:156:2: warning: If memory allocation fails, then there is a possible null pointer dereference: icon [nullPointerOutOfMemory] asmail-2.1/gui.c:153:28: note: Assuming allocation function fails asmail-2.1/gui.c:153:3: note: Assignment 'icon=(struct XpmIcon*)calloc(1,sizeof(struct XpmIcon))', assigned value is 0 asmail-2.1/gui.c:156:2: note: Null pointer dereference asmail-2.1/gui.c:165:2: warning: If memory allocation fails, then there is a possible null pointer dereference: icon [nullPointerOutOfMemory] asmail-2.1/gui.c:153:28: note: Assuming allocation function fails asmail-2.1/gui.c:153:3: note: Assignment 'icon=(struct XpmIcon*)calloc(1,sizeof(struct XpmIcon))', assigned value is 0 asmail-2.1/gui.c:165:2: note: Null pointer dereference asmail-2.1/gui.c:712:9: style: Variable 'status' is reassigned a value before the old one has been used. [redundantAssignment] asmail-2.1/gui.c:711:9: note: status is assigned asmail-2.1/gui.c:712:9: note: status is overwritten asmail-2.1/gui.c:715:9: style: Variable 'status' is reassigned a value before the old one has been used. [redundantAssignment] asmail-2.1/gui.c:712:9: note: status is assigned asmail-2.1/gui.c:715:9: note: status is overwritten asmail-2.1/gui.c:726:9: style: Variable 'status' is reassigned a value before the old one has been used. [redundantAssignment] asmail-2.1/gui.c:715:9: note: status is assigned asmail-2.1/gui.c:726:9: note: status is overwritten asmail-2.1/gui.c:731:9: style: Variable 'status' is reassigned a value before the old one has been used. [redundantAssignment] asmail-2.1/gui.c:726:9: note: status is assigned asmail-2.1/gui.c:731:9: note: status is overwritten asmail-2.1/gui.c:738:9: style: Variable 'status' is reassigned a value before the old one has been used. [redundantAssignment] asmail-2.1/gui.c:731:9: note: status is assigned asmail-2.1/gui.c:738:9: note: status is overwritten asmail-2.1/gui.c:750:9: style: Variable 'status' is reassigned a value before the old one has been used. [redundantAssignment] asmail-2.1/gui.c:738:9: note: status is assigned asmail-2.1/gui.c:750:9: note: status is overwritten asmail-2.1/gui.c:755:9: style: Variable 'status' is reassigned a value before the old one has been used. [redundantAssignment] asmail-2.1/gui.c:750:9: note: status is assigned asmail-2.1/gui.c:755:9: note: status is overwritten asmail-2.1/gui.c:783:9: style: Variable 'status' is reassigned a value before the old one has been used. [redundantAssignment] asmail-2.1/gui.c:755:9: note: status is assigned asmail-2.1/gui.c:783:9: note: status is overwritten asmail-2.1/gui.c:426:29: style: Parameter 'E' can be declared as pointer to const [constParameterPointer] asmail-2.1/gui.c:520:20: style: Variable 'x_size_forced' is assigned a value that is never used. [unreadVariable] asmail-2.1/gui.c:521:20: style: Variable 'y_size_forced' is assigned a value that is never used. [unreadVariable] asmail-2.1/gui.c:639:18: style: Variable 'x_size_forced' is assigned a value that is never used. [unreadVariable] asmail-2.1/gui.c:643:18: style: Variable 'y_size_forced' is assigned a value that is never used. [unreadVariable] asmail-2.1/gui.c:783:9: style: Variable 'status' is assigned a value that is never used. [unreadVariable] asmail-2.1/md5c.c:280:8: style: Parameter 'input' can be declared as pointer to const [constParameterPointer] asmail-2.1/md5c.c:298:16: style: Parameter 'input' can be declared as pointer to const [constParameterPointer] asmail-2.1/mh.c:297:16: portability: Assigning an integer to a pointer is not portable. [AssignmentIntegerToAddress] asmail-2.1/mh.c:313:15: portability: Assigning an integer to a pointer is not portable. [AssignmentIntegerToAddress] asmail-2.1/mh.c:297:4: warning: If memory allocation fails, then there is a possible null pointer dereference: *output [nullPointerOutOfMemory] asmail-2.1/mh.c:296:36: note: Assuming allocation function fails asmail-2.1/mh.c:296:20: note: Assignment '*output=(char**)malloc(sizeof(char*)*1)', assigned value is 0 asmail-2.1/mh.c:297:4: note: Null pointer dereference asmail-2.1/mh.c:313:3: warning: If memory allocation fails, then there is a possible null pointer dereference: *output [nullPointerOutOfMemory] asmail-2.1/mh.c:311:28: note: Assuming allocation function fails asmail-2.1/mh.c:311:12: note: Assignment '*output=(char**)malloc(sizeof(char*)*(i+1))', assigned value is 0 asmail-2.1/mh.c:313:3: note: Null pointer dereference asmail-2.1/mh.c:76:17: style: Variable 'dir_entry' can be declared as pointer to const [constVariablePointer] asmail-2.1/mh.c:147:17: style: Variable 'dir_entry' can be declared as pointer to const [constVariablePointer] asmail-2.1/mh.c:279:24: style: Variable 'end' can be declared as pointer to const [constVariablePointer] asmail-2.1/mh.c:211:26: warning: Char literal compared with pointer 'tokens[i]'. Did you intend to dereference it? [charLiteralWithCharPtrCompare] asmail-2.1/mh.c:224:32: warning: Char literal compared with pointer 'tokens[i]'. Did you intend to dereference it? [charLiteralWithCharPtrCompare] asmail-2.1/mh.c:16:15: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] asmail-2.1/mh.c:35:13: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] asmail-2.1/mh.c:146:28: style: Variable 'i' is assigned a value that is never used. [unreadVariable] asmail-2.1/mh.c:252:6: style: Variable 'pos' is assigned a value that is never used. [unreadVariable] asmail-2.1/pop3.c:73:2: warning:inconclusive: Width 5 given in format string (no. 1) is smaller than destination buffer 'key[256]'. [invalidScanfFormatWidth_smaller] asmail-2.1/pop3.c:110:3: warning:inconclusive: Width 5 given in format string (no. 1) is smaller than destination buffer 'key[256]'. [invalidScanfFormatWidth_smaller] asmail-2.1/pop3.c:120:3: warning:inconclusive: Width 5 given in format string (no. 1) is smaller than destination buffer 'key[256]'. [invalidScanfFormatWidth_smaller] asmail-2.1/pop3.c:128:3: warning:inconclusive: Width 5 given in format string (no. 1) is smaller than destination buffer 'key[256]'. [invalidScanfFormatWidth_smaller] asmail-2.1/pop3.c:144:2: warning:inconclusive: Width 5 given in format string (no. 1) is smaller than destination buffer 'key[256]'. [invalidScanfFormatWidth_smaller] asmail-2.1/pop3.c:153:2: warning:inconclusive: Width 5 given in format string (no. 1) is smaller than destination buffer 'key[256]'. [invalidScanfFormatWidth_smaller] asmail-2.1/pop3.c:58:9: style: Variable 'str_ptr' can be declared as pointer to const [constVariablePointer] asmail-2.1/pop3.c:59:9: style: Variable 'str_end' can be declared as pointer to const [constVariablePointer] asmail-2.1/asmail.c:592:15: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] asmail-2.1/asmail.c:604:16: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] asmail-2.1/asmail.c:241:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] asmail-2.1/asmail.c:855:5: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] asmail-2.1/asmail.c:269:3: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:271:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:366:3: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:368:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:371:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:374:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:377:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:380:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:383:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:385:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:392:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:434:3: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:436:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:439:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:462:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:469:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:554:3: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:556:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:574:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:576:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:578:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:580:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:582:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:594:6: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:608:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:610:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:612:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:614:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:621:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:628:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:711:3: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:713:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:720:4: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] asmail-2.1/asmail.c:506:3: error: Memory leak: new_mbox [memleak] asmail-2.1/asmail.c:120:31: style: Parameter 'argv' can be declared as const array [constParameter] asmail-2.1/asmail.c:254:60: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] asmail-2.1/asmail.c:351:57: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] asmail-2.1/asmail.c:534:57: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] asmail-2.1/asmail.c:539:9: style: Variable 'str_ptr' can be declared as pointer to const [constVariablePointer] asmail-2.1/asmail.c:779:9: style: Variable 'tmp_ptr' can be declared as pointer to const [constVariablePointer] diff: 2.17.0 asmail-2.1/maildir.c:20:15: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] 2.17.0 asmail-2.1/mh.c:179:22: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] 2.17.0 asmail-2.1/mh.c:83:22: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] DONE