[coreboot] New Defects reported by Coverity Scan for coreboot
scan-admin at coverity.com
scan-admin at coverity.com
Tue Dec 20 13:25:54 CET 2016
Hi,
Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.
1 new defect(s) introduced to coreboot found with Coverity Scan.
7 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 1 of 1 defect(s)
** CID 1367555: Integer handling issues (INCOMPATIBLE_CAST)
________________________________________________________________________________________________________
*** CID 1367555: Integer handling issues (INCOMPATIBLE_CAST)
/dev/cb-build/coreboot-coverity.0/AMD_GARDENIA/agesa/PspBaseLib.c: 326 in UpdataPspDirCheckSum()
320
321 VOID
322 UpdataPspDirCheckSum (
323 IN OUT PSP_DIRECTORY *PspDir
324 )
325 {
>>> CID 1367555: Integer handling issues (INCOMPATIBLE_CAST)
>>> Pointer "&PspDir->Header.TotalEntries" points to an object whose effective type is "unsigned long" (32 bits, unsigned) but is dereferenced as a narrower "unsigned short" (16 bits, unsigned). This may lead to unexpected results depending on machine endianness.
326 PspDir->Header.Checksum = Fletcher32 ((UINT16 *) &PspDir->Header.TotalEntries, \
327 (sizeof (PSP_DIRECTORY_HEADER) - OFFSET_OF (PSP_DIRECTORY_HEADER, TotalEntries) + PspDir->Header.TotalEntries * sizeof (PSP_DIRECTORY_ENTRY)) / 2);
328 }
329
330 /**
331 Check if PSP device is present
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbLuoVetFLSjdonCi1EjfHRqWGQvojmmkYaBE-2BPJiTQvQ-3D-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5Y7akDg5EpDDKUW6aROAgiKHKYDADuCuyg6NIFYGy0fitvyjJTjcZZXzhDaplD9BOS8NDTEHr7hh3d2uT2kil7L993DB8Mnjzu5O7ShJPRr7225UJbrdC-2BV004mu91hHyJ9hjOLGlXz7HAveXX9xoA0PjH7-2Fp4eKpR55edU8d3OV-2BRKCy0j-2FYZCeuR4bzIcg8w-3D
To manage Coverity Scan email notifications for "coreboot at coreboot.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4e-2BpBzwOa5gzBZa9dWpDbzfofODnVj1enK2UkK0-2BgCCqyeem8IVKvTxSaOFkteZFcnohwvb2rnYNjswGryEWCURnUk6WHU42sbOmtOjD-2Bx5c-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5Y7akDg5EpDDKUW6aROAgiKah1TZvMutj7Ttsi9PL-2Bmc-2FiH3opL9ikqKX0WMlc-2BJEb-2FKJ4X2Qdwags3oXcfqWXO1cnAPO-2Bu6YSwScCHYSc68n4UmaiiJINhxKCm4Fvo-2Bw3Ax9X31CbMp-2B4N79m7UK7DhS5UQFe-2B-2FN9EQgvRRmhAde7f0w4HWqgolvsz2P6177E-3D
More information about the coreboot
mailing list