Task #972 - fixed.err
back to task #972download
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: 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-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-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: 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)