Task #1706 - pcsc-lite-ccid-1.5.5-3.fc40/scan-results.err
back to task #1706download
Error: CPPCHECK_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/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: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/examples/scardcontrol.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_serial.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c: scope_hint: In function 'get_ccid_device_descriptor' pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c:1238:31: warning[-Wanalyzer-null-dereference]: dereference of NULL 'usb_interface' # 1236| #endif # 1237| # 1238|-> if (0 == usb_interface->num_altsetting) { # 1239| /* No interface descriptor available. */ # 1240| return NULL; Error: GCC_ANALYZER_WARNING (CWE-476): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c: scope_hint: In function ‘get_ccid_device_descriptor’ pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c:1238:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘usb_interface’ # 1236| #endif # 1237| # 1238|-> if (0 == usb_interface->num_altsetting) { # 1239| /* No interface descriptor available. */ # 1240| return NULL; Error: GCC_ANALYZER_WARNING (CWE-476): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c: scope_hint: In function 'get_end_points' pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c:1291:34: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' # 1289| * 3 Endpoints maximum: Interrupt In, Bulk In, Bulk Out # 1290| */ # 1291|-> for (i=0; i<usb_interface->altsetting->bNumEndpoints; i++) # 1292| { # 1293| /* interrupt end point (if available) */ Error: GCC_ANALYZER_WARNING (CWE-476): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c: scope_hint: In function ‘get_end_points’ pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c:1291:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 1289| * 3 Endpoints maximum: Interrupt In, Bulk In, Bulk Out # 1290| */ # 1291|-> for (i=0; i<usb_interface->altsetting->bNumEndpoints; i++) # 1292| { # 1293| /* interrupt end point (if available) */ Error: GCC_ANALYZER_WARNING (CWE-476): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c: scope_hint: In function 'get_data_rates' pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c:1433:96: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' # 1431| int bNumDataRatesSupported; # 1432| # 1433|-> bNumDataRatesSupported = get_ccid_device_descriptor(get_ccid_usb_interface(desc, &num))[27]; # 1434| if (0 == bNumDataRatesSupported) # 1435| /* read up to the buffer size */ Error: GCC_ANALYZER_WARNING (CWE-476): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c: scope_hint: In function ‘get_data_rates’ pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ccid_usb.c:1433:96: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 1431| int bNumDataRatesSupported; # 1432| # 1433|-> bNumDataRatesSupported = get_ccid_device_descriptor(get_ccid_usb_interface(desc, &num))[27]; # 1434| if (0 == bNumDataRatesSupported) # 1435| /* read up to the buffer size */ Error: CPPCHECK_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/commands.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/commands.c:1369:2: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 1367| } # 1368| # 1369|-> memcpy(cmd+11, tx_buffer, tx_length); # 1370| # 1371| ret = WritePort(reader_index, 11+tx_length, cmd); Error: CLANG_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/commands.c:2099:17: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 2097| in_buf = tmp_buf; # 2098| } # 2099|-> sw2 = *rcv_buf = *in_buf; # 2100| (*rcv_len)++; # 2101| Error: CPPCHECK_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/debug.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/ifdhandler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/openct/proto-t1.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/parse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-775): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/parse.c: scope_hint: In function ‘main’ pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/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): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/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: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/simclist.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/simclist.c: scope_hint: In function 'list_delete_range' pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/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: GCC_ANALYZER_WARNING (CWE-476): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/simclist.c: scope_hint: In function ‘list_delete_range’ pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/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: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/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: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/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: CPPCHECK_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c: scope_hint: In function 'yy_create_buffer' pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:1335:12: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(64)' pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:713:1: note: in expansion of macro 'YY_DECL' pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c: scope_hint: In function 'yy_create_buffer' # 1333| */ # 1334| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); # 1335|-> if ( ! b->yy_ch_buf ) # 1336| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); # 1337| Error: GCC_ANALYZER_WARNING (CWE-401): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c: scope_hint: In function ‘yy_create_buffer’ pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:1335:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’ pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:713:1: note: in expansion of macro ‘YY_DECL’ pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c: scope_hint: In function ‘yy_create_buffer’ # 1333| */ # 1334| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); # 1335|-> if ( ! b->yy_ch_buf ) # 1336| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); # 1337| Error: CPPCHECK_WARNING (CWE-476): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:1375: warning[nullPointer]: Possible null pointer dereference: b # 1373| yy_flush_buffer( b ); # 1374| # 1375|-> b->yy_input_file = file; # 1376| b->yy_fill_buffer = 1; # 1377| Error: CPPCHECK_WARNING (CWE-476): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:1376: warning[nullPointer]: Possible null pointer dereference: b # 1374| # 1375| b->yy_input_file = file; # 1376|-> b->yy_fill_buffer = 1; # 1377| # 1378| /* If b is the current buffer, then yy_init_buffer was _probably_ Error: GCC_ANALYZER_WARNING (CWE-476): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.l: scope_hint: In function 'eval_key' pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.l:98:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'elt' pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:713: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-476): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.l: scope_hint: In function ‘eval_key’ pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.l:98:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘elt’ pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:713: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): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.l:99:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'malloc(len)' where non-null expected pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:713: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): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.l:99:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(len)’ where non-null expected pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:713: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): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.l: scope_hint: In function 'eval_value' pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.l:131:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'value' where non-null expected pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:713: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-688): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.l: scope_hint: In function ‘eval_value’ pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.l:131:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘value’ where non-null expected pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:713: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): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.l:155:1: warning[-Wanalyzer-malloc-leak]: leak of 'amp' pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:713:1: note: in expansion of macro 'YY_DECL' # 153| assert(r >= 0); # 154| (void)r; # 155|-> } # 156| # 157| void tperrorCheck (char *token_error) Error: GCC_ANALYZER_WARNING (CWE-401): pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.l:155:1: warning[-Wanalyzer-malloc-leak]: leak of ‘amp’ pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/tokenparser.c:713: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: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/towitoko/atr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: pcsc-lite-ccid-1.5.5-build/ccid-1.5.5/src/towitoko/pps.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.