Hi,
Please find the latest report on new defect(s) introduced to coreboot found
with Coverity Scan.
3 new defect(s) introduced to coreboot found with Coverity Scan.
2 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent
build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)
** CID 1445995: Code maintainability issues (UNUSED_VALUE)
/src/arch/x86/acpi_bert_storage.c: 534 in bert_new_event()
________________________________________________________________________________________________________
*** CID 1445995: Code maintainability issues (UNUSED_VALUE)
/src/arch/x86/acpi_bert_storage.c: 534 in bert_new_event()
528 if (!status)
529 return NULL;
530
531 status->raw_data_length = sizeof(*status);
532
533 if (!guidcmp(guid, &CPER_SEC_PROC_GENERIC_GUID))
>>> CID 1445995: Code maintainability issues (UNUSED_VALUE)
>>> Assigning value from "bert_append_genproc(status)" to "r" here, but
>>> that stored value is overwritten before it can be used.
534 r = bert_append_genproc(status);
535 else if (!guidcmp(guid, &CPER_SEC_PROC_GENERIC_GUID))
536 r = bert_append_ia32x64(status);
537 if (!guidcmp(guid, &CPER_SEC_FW_ERR_REC_REF_GUID))
538 r = bert_append_fw_err(status);
539 /* else if other types not implemented */
** CID 1445994: Integer handling issues (BAD_SHIFT)
/src/soc/amd/common/block/acpi/pm_state.c: 21 in get_index_bit()
________________________________________________________________________________________________________
*** CID 1445994: Integer handling issues (BAD_SHIFT)
/src/soc/amd/common/block/acpi/pm_state.c: 21 in get_index_bit()
15 uint32_t t;
16
17 if (limit > TOTAL_BITS(uint32_t))
18 return -1;
19
20 /* get a mask of valid bits. Ex limit = 3, set bits 0-2 */
>>> CID 1445994: Integer handling issues (BAD_SHIFT)
>>> In expression "1 << limit", left shifting by more than 31 bits has
>>> undefined behavior. The shift amount, "limit", is as much as 32.
21 t = (1 << limit) - 1;
22 if ((value & t) == 0)
23 return -1;
24 t = 1;
25 for (i = 0; i < limit; i++) {
26 if (value & t)
** CID 1445993: Code maintainability issues (UNUSED_VALUE)
/src/arch/x86/acpi_bert_storage.c: 536 in bert_new_event()
________________________________________________________________________________________________________
*** CID 1445993: Code maintainability issues (UNUSED_VALUE)
/src/arch/x86/acpi_bert_storage.c: 536 in bert_new_event()
530
531 status->raw_data_length = sizeof(*status);
532
533 if (!guidcmp(guid, &CPER_SEC_PROC_GENERIC_GUID))
534 r = bert_append_genproc(status);
535 else if (!guidcmp(guid, &CPER_SEC_PROC_GENERIC_GUID))
>>> CID 1445993: Code maintainability issues (UNUSED_VALUE)
>>> Assigning value from "bert_append_ia32x64(status)" to "r" here, but
>>> that stored value is overwritten before it can be used.
536 r = bert_append_ia32x64(status);
537 if (!guidcmp(guid, &CPER_SEC_FW_ERR_REC_REF_GUID))
538 r = bert_append_fw_err(status);
539 /* else if other types not implemented */
540 else
541 r = NULL;
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yq2SfQfrHt3Prsn4qSLrYIrajINpiFX8l0vrlNSf8iCrS27qY0Cr0DkycwNUgGZJj8-3DA7Pg_L-2FDzr14mnrsJO5b1wX1hp9b1MAQygl7x-2B74RAaH2cn1M2RwJe74sKLFnZ3h2NUn0194umO0-2FySrt4EUtHLRnaxgbljk8fjcmg60mUEzRWNYgwKBfjymOz4wmsHf7VZQydJ5XJKTAlHJxh2OFCfTAb09zVCY-2B4i5i84y4ef6bDe-2Fza1mK2A8PP4DdLMKsKlx-2BylzGuhFpai3-2FeL6Xc87zspmjbXQK-2FwgQtFNrno4qkFo-3D
_______________________________________________
coreboot mailing list -- [email protected]
To unsubscribe send an email to [email protected]