Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c: scope_hint: In function ‘tokenparser_create_buffer’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c:1594:12: warning[-Wanalyzer-malloc-leak]: leak of ‘tokenparseralloc(64)’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/tokenparser.l:228:23: note: in expansion of macro ‘yylex’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c:952:21: note: in expansion of macro ‘yylex’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c:972:1: note: in expansion of macro ‘YY_DECL’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c:996:18: note: in expansion of macro ‘yyensure_buffer_stack’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c:996:18: note: in expansion of macro ‘yyensure_buffer_stack’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c:1733:13: note: in expansion of macro ‘yyensure_buffer_stack’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c:996:18: note: in expansion of macro ‘yyensure_buffer_stack’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c:998:26: note: in expansion of macro ‘yy_create_buffer’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c:1580:21: note: in expansion of macro ‘yy_create_buffer’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c:1584:24: note: in expansion of macro ‘yyalloc’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c:2044:7: note: in expansion of macro ‘yyalloc’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c:1584:24: note: in expansion of macro ‘yyalloc’ # 1592| * we need to put in 2 end-of-buffer characters. # 1593| */ # 1594|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); # 1595| if ( ! b->yy_ch_buf ) # 1596| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); Error: CPPCHECK_WARNING: [#def2] pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c: scope_hint: In function ‘tokenparser_create_buffer’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:1594:12: warning[-Wanalyzer-malloc-leak]: leak of ‘tokenparseralloc(64)’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/tokenparser.l:228:23: note: in expansion of macro ‘yylex’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:952:21: note: in expansion of macro ‘yylex’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:972:1: note: in expansion of macro ‘YY_DECL’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:996:18: note: in expansion of macro ‘yyensure_buffer_stack’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:996:18: note: in expansion of macro ‘yyensure_buffer_stack’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:1733:13: note: in expansion of macro ‘yyensure_buffer_stack’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:996:18: note: in expansion of macro ‘yyensure_buffer_stack’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:998:26: note: in expansion of macro ‘yy_create_buffer’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:1580:21: note: in expansion of macro ‘yy_create_buffer’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:1584:24: note: in expansion of macro ‘yyalloc’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:2044:7: note: in expansion of macro ‘yyalloc’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:1584:24: note: in expansion of macro ‘yyalloc’ # 1592| * we need to put in 2 end-of-buffer characters. # 1593| */ # 1594|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); # 1595| if ( ! b->yy_ch_buf ) # 1596| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); Error: CPPCHECK_WARNING (CWE-476): [#def4] pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:1634: warning[nullPointer]: Possible null pointer dereference: b # 1632| # 1633| yy_flush_buffer( b ); # 1634|-> # 1635| b->yy_input_file = file; # 1636| b->yy_fill_buffer = 1; Error: CPPCHECK_WARNING (CWE-476): [#def5] pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccidtwin.so.p/tokenparser.c:1635: warning[nullPointer]: Possible null pointer dereference: b # 1633| yy_flush_buffer( b ); # 1634| # 1635|-> b->yy_input_file = file; # 1636| b->yy_fill_buffer = 1; # 1637| Error: CPPCHECK_WARNING: [#def6] pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/parse.p/tokenparser.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-476): [#def7] pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/parse.p/tokenparser.c:1634: warning[nullPointer]: Possible null pointer dereference: b # 1632| # 1633| yy_flush_buffer( b ); # 1634|-> # 1635| b->yy_input_file = file; # 1636| b->yy_fill_buffer = 1; Error: CPPCHECK_WARNING (CWE-476): [#def8] pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/parse.p/tokenparser.c:1635: warning[nullPointer]: Possible null pointer dereference: b # 1633| yy_flush_buffer( b ); # 1634| # 1635|-> b->yy_input_file = file; # 1636| b->yy_fill_buffer = 1; # 1637| Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c: scope_hint: In function ‘list_restore_filedescriptor’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:100:64: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1297:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1297:5: note: in expansion of macro ‘READ_ERRCHECK’ /usr/include/arpa/inet.h:22: included_from: Included from here. pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:39: included_from: Included from here. pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1305:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1305:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1307:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1311:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1316:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1320:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1324:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1328:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:98:74: note: in definition of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1342:17: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1297:5: note: in expansion of macro ‘READ_ERRCHECK’ # 98| if (read(fd, msgbuf, msglen) != msglen) { \ # 99| /*errno = EPROTO;*/ \ # 100|-> return -1; \ # 101| } \ # 102| } while (0); Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1349:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1297:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1305:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1305:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1307:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1311:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1316:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1320:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1324:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1328:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1352:17: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1352:17: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c: scope_hint: In function ‘list_restore_filedescriptor’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c: scope_hint: In function ‘list_restore_filedescriptor’ # 1347| /* copy verbatim into memory */ # 1348| for (cnt = 0; cnt < header.numels; cnt++) { # 1349|-> buf = malloc(header.elemlen); # 1350| if (NULL == buf) # 1351| return -1; Error: CLANG_WARNING: [#def11] pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1357:22: warning[unix.Malloc]: Potential leak of memory pointed to by 'buf' # 1355| totmemorylen = header.numels * header.elemlen; # 1356| } # 1357|-> totreadlen = header.numels * header.elemlen; # 1358| } else { # 1359| /* elements have variable size. Each element is preceded by its size */ Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1376:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1297:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1305:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1305:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1307:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1311:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1316:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1320:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1324:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1328:5: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1375:17: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1375:17: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1379:17: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1379:17: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c: scope_hint: In function ‘list_restore_filedescriptor’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c: scope_hint: In function ‘list_restore_filedescriptor’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1375:17: note: in expansion of macro ‘READ_ERRCHECK’ pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:1375:17: note: in expansion of macro ‘READ_ERRCHECK’ # 1374| for (cnt = 0; cnt < header.numels; cnt++) { # 1375| READ_ERRCHECK(fd, & elsize, sizeof(elsize)); # 1376|-> buf = malloc(elsize); # 1377| if (NULL == buf) # 1378| return -1;
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-clang | 18.1.7 |
diffbase-analyzer-version-cppcheck | 2.14.2 |
diffbase-analyzer-version-gcc | 14.1.1 |
diffbase-analyzer-version-gcc-analyzer | 14.1.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-enabled-plugins | clang, cppcheck, gcc, shellcheck |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-102.us-west-2.compute.internal |
diffbase-mock-config | fedora-41-x86_64 |
diffbase-project-name | pcsc-lite-ccid-1.5.5-3.fc40 |
diffbase-store-results-to | /tmp/tmpbure_tuf/pcsc-lite-ccid-1.5.5-3.fc40.tar.xz |
diffbase-time-created | 2024-07-03 16:32:02 |
diffbase-time-finished | 2024-07-03 16:33:34 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpbure_tuf/pcsc-lite-ccid-1.5.5-3.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpbure_tuf/pcsc-lite-ccid-1.5.5-3.fc40.src.rpm' |
diffbase-tool-version | csmock-3.5.3-1.el9 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-102.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | pcsc-lite-ccid-1.6.0-1.fc41 |
store-results-to | /tmp/tmpcatxjhgu/pcsc-lite-ccid-1.6.0-1.fc41.tar.xz |
time-created | 2024-07-03 16:33:44 |
time-finished | 2024-07-03 16:34:49 |
title | Newly introduced defects |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpcatxjhgu/pcsc-lite-ccid-1.6.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpcatxjhgu/pcsc-lite-ccid-1.6.0-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |