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-2BfV0V05UPxvVjWch-2Bd2MGckcRbLuoVetFLSjdonCi1EjfHRqWGQvojmmkYaBE-2BPJiTQvQ-3D-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5b8klAyl0f2RoRZhrbCUYMa5uBhS1IQ-2FjqwpYdbWtPJwb0QGy-2F1U9kzh6ptN8heQYB-2FCj4BwjKV6mlaJqa-2F04lDhKlmXN7Kgo4XWyQsx6HBpew6YzujYI5G1Ciy5ah8Wkrs0ojEKRt4KtTul9HSJH-2B6Jlpd8eb4kiRvn6trld4l0eF-2FQEJfWee1hfy1aJGiWRc-3D

To manage Coverity Scan email notifications for "[email protected]", click 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4e-2BpBzwOa5gzBZa9dWpDbzfofODnVj1enK2UkK0-2BgCCqyeem8IVKvTxSaOFkteZFcnohwvb2rnYNjswGryEWCURnUk6WHU42sbOmtOjD-2Bx5c-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5b8klAyl0f2RoRZhrbCUYMaWrywncYbMQCSOk7gp6q0zkf5ZF0DVe8dMwywUDBdWKwlpafs3yMktcB8sFWSx3Ihap-2Bv-2F56jOSsrj1ABVec-2B9xotAAwK-2FoOqo-2BY3gk9XuQV5buVyKSsiwfDpoKlwFjPidg85Gq-2FJs9yviOu8ltXnk8194YE9t5zW-2FecGNnZtqyk-3D


-- 
coreboot mailing list: [email protected]
https://mail.coreboot.org/mailman/listinfo/coreboot

Reply via email to