pcsc-lite-ccid-1.6.0-1.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/contrib/Kobil_mIDentity_switch/Kobil_mIDentity_switch.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def2]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/examples/scardcontrol.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def3]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.so.p/tokenparser.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
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 (CWE-476): [#def5]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.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): [#def6]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/libccid.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: [#def7]
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): [#def8]
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): [#def9]
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): [#def10]
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: [#def11]
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: GCC_ANALYZER_WARNING (CWE-401): [#def12]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/parse.p/tokenparser.c: scope_hint: In function ‘tokenparser_create_buffer’
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/redhat-linux-build/parse.p/tokenparser.c:1594:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(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/parse.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/parse.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/parse.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/parse.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/parse.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/parse.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/parse.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/parse.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/parse.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/parse.p/tokenparser.c: scope_hint: In function ‘tokenparser_create_buffer’
# 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): [#def13]
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): [#def14]
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: CPPCHECK_WARNING: [#def15]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/ccid.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def16]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/ccid_serial.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def17]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/ccid_usb.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def18]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/commands.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def19]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/commands.c:1361:2: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1359|   	}
# 1360|   
# 1361|-> 	memcpy(cmd+11, tx_buffer, tx_length);
# 1362|   
# 1363|   	ret = WritePort(reader_index, 11+tx_length, cmd);

Error: CLANG_WARNING: [#def20]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/commands.c:2091:17: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 2089|   		in_buf = tmp_buf;
# 2090|   	}
# 2091|-> 	sw2 = *rcv_buf = *in_buf;
# 2092|   	(*rcv_len)++;
# 2093|   

Error: CPPCHECK_WARNING: [#def21]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/debug.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def22]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/ifdhandler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def23]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/openct/proto-t1.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def24]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/parse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-775): [#def25]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/parse.c: scope_hint: In function ‘main’
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/parse.c:102:27: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("output.txt", "w+")’
#  100|   	/* for every device */
#  101|   	i = 0;
#  102|-> 	while ((dev = devs[i++]) != NULL)
#  103|   	{
#  104|   		struct libusb_device_descriptor desc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/parse.c:102:27: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("output.txt", "w+")’
#  100|   	/* for every device */
#  101|   	i = 0;
#  102|-> 	while ((dev = devs[i++]) != NULL)
#  103|   	{
#  104|   		struct libusb_device_descriptor desc;

Error: CPPCHECK_WARNING: [#def27]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
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-476): [#def29]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c: scope_hint: In function ‘list_delete_range’
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:601:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  599|   
#  600|       tmp = list_findpos(l, posstart);    /* first el to be deleted */
#  601|->     lastvalid = tmp->prev;              /* last valid element */
#  602|   
#  603|       midposafter = (l->numels-1-numdel)/2;

Error: CLANG_WARNING: [#def30]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:802:67: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from field 'mid')
#  800|       if ((err+1)/2 > 0) {        /* correct pos RIGHT (err-1)/2 moves */
#  801|           err = (err+1)/2;
#  802|->         for (cnt = 0; cnt < (unsigned int)err; cnt++) dest->mid = dest->mid->next;
#  803|       } else if (err/2 < 0) { /* correct pos LEFT (err/2)-1 moves */
#  804|           err = -err/2;

Error: CLANG_WARNING: [#def31]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/simclist.c:805:67: warning[core.NullDereference]: Access to field 'prev' results in a dereference of a null pointer (loaded from field 'mid')
#  803|       } else if (err/2 < 0) { /* correct pos LEFT (err/2)-1 moves */
#  804|           err = -err/2;
#  805|->         for (cnt = 0; cnt < (unsigned int)err; cnt++) dest->mid = dest->mid->prev;
#  806|       }
#  807|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
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: [#def33]
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): [#def34]
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;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def35]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/tokenparser.l: scope_hint: In function ‘eval_key’
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/tokenparser.l:98:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘elt’
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’
#   96|   	len++;	/* final NULL byte */
#   97|   
#   98|-> 	elt->key = malloc(len);
#   99|   	memcpy(elt->key, &pcToken[5], len-1);
#  100|   	elt->key[len-1] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-688): [#def36]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/tokenparser.l:99:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(len)’ where non-null expected
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’
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#   97|   
#   98|   	elt->key = malloc(len);
#   99|-> 	memcpy(elt->key, &pcToken[5], len-1);
#  100|   	elt->key[len-1] = '\0';
#  101|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def37]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/tokenparser.l: scope_hint: In function ‘eval_value’
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/tokenparser.l:131:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘value’ where non-null expected
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’
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  129|   	assert(value);
#  130|   
#  131|-> 	memcpy(value, &pcToken[8], len-1);
#  132|   	value[len-1] = '\0';
#  133|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/tokenparser.l:155:1: warning[-Wanalyzer-malloc-leak]: leak of ‘amp’
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’
#  153|   	assert(r >= 0);
#  154|   	(void)r;
#  155|-> }
#  156|   
#  157|   void tperrorCheck (char *token_error)

Error: CPPCHECK_WARNING: [#def39]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/towitoko/atr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def40]
pcsc-lite-ccid-1.6.0-build/ccid-1.6.0/src/towitoko/pps.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-102.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namepcsc-lite-ccid-1.6.0-1.fc41
store-results-to/tmp/tmpcatxjhgu/pcsc-lite-ccid-1.6.0-1.fc41.tar.xz
time-created2024-07-03 16:33:44
time-finished2024-07-03 16:34:49
toolcsmock
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-versioncsmock-3.5.3-1.el9