Hi,
Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.
4 new defect(s) introduced to coreboot found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan Showing 4 of 4 defect(s)
** CID 1374934: Memory - illegal accesses (OVERRUN) /src/drivers/storage/storage.c: 104 in display_capacity()
________________________________________________________________________________________________________ *** CID 1374934: Memory - illegal accesses (OVERRUN) /src/drivers/storage/storage.c: 104 in display_capacity() 98 /* Determine the hex divisor for the capacity */ 99 ASSERT(ARRAY_SIZE(hex_capacity_table) == ARRAY_SIZE(hex_unit_name)); 100 for (index = 0; index < ARRAY_SIZE(hex_capacity_table); index++) { 101 if (capacity >= hex_capacity_table[index]) 102 break; 103 }
CID 1374934: Memory - illegal accesses (OVERRUN) Overrunning array "hex_capacity_table" of 5 8-byte elements at element index 5 (byte offset 40) using index "index" (which evaluates to 5).
104 hex_divisor = hex_capacity_table[index]; 105 hex_units = hex_unit_name[index]; 106 107 /* Display the capacity */ 108 sdhc_debug("%3lld.%03lld %sytes (%3lld.%03lld %sytes)%s%s\n", 109 capacity / decimal_divisor,
** CID 1374933: Memory - illegal accesses (OVERRUN) /src/drivers/storage/storage.c: 96 in display_capacity()
________________________________________________________________________________________________________ *** CID 1374933: Memory - illegal accesses (OVERRUN) /src/drivers/storage/storage.c: 96 in display_capacity() 90 == ARRAY_SIZE(decimal_unit_name)); 91 for (index = 0; index < ARRAY_SIZE(decimal_capacity_table); index++) { 92 if (capacity >= decimal_capacity_table[index]) 93 break; 94 } 95 decimal_divisor = decimal_capacity_table[index];
CID 1374933: Memory - illegal accesses (OVERRUN) Overrunning array "decimal_unit_name" of 5 4-byte elements at element index 5 (byte offset 20) using index "index" (which evaluates to 5).
96 decimal_units = decimal_unit_name[index]; 97 98 /* Determine the hex divisor for the capacity */ 99 ASSERT(ARRAY_SIZE(hex_capacity_table) == ARRAY_SIZE(hex_unit_name)); 100 for (index = 0; index < ARRAY_SIZE(hex_capacity_table); index++) { 101 if (capacity >= hex_capacity_table[index])
** CID 1374932: Memory - illegal accesses (OVERRUN) /src/drivers/storage/storage.c: 105 in display_capacity()
________________________________________________________________________________________________________ *** CID 1374932: Memory - illegal accesses (OVERRUN) /src/drivers/storage/storage.c: 105 in display_capacity() 99 ASSERT(ARRAY_SIZE(hex_capacity_table) == ARRAY_SIZE(hex_unit_name)); 100 for (index = 0; index < ARRAY_SIZE(hex_capacity_table); index++) { 101 if (capacity >= hex_capacity_table[index]) 102 break; 103 } 104 hex_divisor = hex_capacity_table[index];
CID 1374932: Memory - illegal accesses (OVERRUN) Overrunning array "hex_unit_name" of 5 4-byte elements at element index 5 (byte offset 20) using index "index" (which evaluates to 5).
105 hex_units = hex_unit_name[index]; 106 107 /* Display the capacity */ 108 sdhc_debug("%3lld.%03lld %sytes (%3lld.%03lld %sytes)%s%s\n", 109 capacity / decimal_divisor, 110 (capacity / (decimal_divisor / 1000)) % 1000,
** CID 1374931: Memory - illegal accesses (OVERRUN) /src/drivers/storage/storage.c: 95 in display_capacity()
________________________________________________________________________________________________________ *** CID 1374931: Memory - illegal accesses (OVERRUN) /src/drivers/storage/storage.c: 95 in display_capacity() 89 ASSERT(ARRAY_SIZE(decimal_capacity_table) 90 == ARRAY_SIZE(decimal_unit_name)); 91 for (index = 0; index < ARRAY_SIZE(decimal_capacity_table); index++) { 92 if (capacity >= decimal_capacity_table[index]) 93 break; 94 }
CID 1374931: Memory - illegal accesses (OVERRUN) Overrunning array "decimal_capacity_table" of 5 8-byte elements at element index 5 (byte offset 40) using index "index" (which evaluates to 5).
95 decimal_divisor = decimal_capacity_table[index]; 96 decimal_units = decimal_unit_name[index]; 97 98 /* Determine the hex divisor for the capacity */ 99 ASSERT(ARRAY_SIZE(hex_capacity_table) == ARRAY_SIZE(hex_unit_name)); 100 for (index = 0; index < ARRAY_SIZE(hex_capacity_table); index++) {
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05...
To manage Coverity Scan email notifications for "coreboot@coreboot.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05...