Hi,
Please find the latest report on new defect(s) introduced to coreboot found
with Coverity Scan.
2 new defect(s) introduced to coreboot found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 1458232: Null pointer dereferences (REVERSE_INULL)
/src/drivers/usb/acpi/usb_acpi.c: 130 in usb_acpi_get_pld()
________________________________________________________________________________________________________
*** CID 1458232: Null pointer dereferences (REVERSE_INULL)
/src/drivers/usb/acpi/usb_acpi.c: 130 in usb_acpi_get_pld()
124 };
125
126 bool usb_acpi_get_pld(const struct device *usb_device, struct acpi_pld
*pld)
127 {
128 struct drivers_usb_acpi_config *config = usb_device->chip_info;
129
>>> CID 1458232: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "usb_device" suggests that it may be null, but it has
>>> already been dereferenced on all paths leading to the check.
130 if (!usb_device || !usb_device->chip_info ||
131 usb_device->chip_ops != &drivers_usb_acpi_ops)
132 return false;
133
134 if (config->use_custom_pld)
135 memcpy(pld, &config->custom_pld, sizeof(pld));
** CID 1458231: Incorrect expression (SIZEOF_MISMATCH)
/src/drivers/usb/acpi/usb_acpi.c: 135 in usb_acpi_get_pld()
________________________________________________________________________________________________________
*** CID 1458231: Incorrect expression (SIZEOF_MISMATCH)
/src/drivers/usb/acpi/usb_acpi.c: 135 in usb_acpi_get_pld()
129
130 if (!usb_device || !usb_device->chip_info ||
131 usb_device->chip_ops != &drivers_usb_acpi_ops)
132 return false;
133
134 if (config->use_custom_pld)
>>> CID 1458231: Incorrect expression (SIZEOF_MISMATCH)
>>> Passing argument "pld" of type "struct acpi_pld *" and argument "4UL /*
>>> sizeof (pld) */" to function "memcpy" is suspicious.
135 memcpy(pld, &config->custom_pld, sizeof(pld));
136 else
137 acpi_pld_fill_usb(pld, config->type, &config->group);
138
139 return true;
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yq2SfQfrHt3Prsn4qSLrYIrajINpiFX8l0vrlNSf8iCrS27qY0Cr0DkycwNUgGZJj8-3DmIXw_L-2FDzr14mnrsJO5b1wX1hp9b1MAQygl7x-2B74RAaH2cn3ln0G-2Fl8Du-2FPb-2FjnYOR4GDeLCTh-2Ff-2BTs2XjTD-2BPtnD1RiRz7yNxilCb-2F0Wi5YMhgAiofwe8tvUrA8duNBL6lQuq7ChtQPCex4N-2FpOuA2Ex7tv-2B07D8NixBvhgDfni8mle0QAC7mWwlxWHWI3ahcV5dw8RqCsSaX4X2-2BFgLd3ldgQ-3D-3D
_______________________________________________
coreboot mailing list -- [email protected]
To unsubscribe send an email to [email protected]