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 1490278: Integer handling issues (OVERFLOW_BEFORE_WIDEN)
/src/soc/rockchip/rk3288/soc.c: 16 in soc_init()
________________________________________________________________________________________________________
*** CID 1490278: Integer handling issues (OVERFLOW_BEFORE_WIDEN)
/src/soc/rockchip/rk3288/soc.c: 16 in soc_init()
10 #include <symbols.h>
11
12 #include "chip.h"
13
14 static void soc_init(struct device *dev)
15 {
>>> CID 1490278: Integer handling issues (OVERFLOW_BEFORE_WIDEN)
>>> Potentially overflowing expression "sdram_size_mb() * 1048576U" with
>>> type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit
>>> arithmetic, and then used in a context that expects an expression of type
>>> "uint64_t" (64 bits, unsigned).
16 ram_range(dev, 0, (uintptr_t)_dram, sdram_size_mb() * MiB);
17 if (display_init_required())
18 rk_display_init(dev, (uintptr_t)_framebuffer,
19 REGION_SIZE(framebuffer));
20 else
21 printk(BIOS_INFO, "Skipping display init.\n");
** CID 1490277: Integer handling issues (OVERFLOW_BEFORE_WIDEN)
/src/mainboard/emulation/qemu-armv7/mainboard.c: 42 in mainboard_enable()
________________________________________________________________________________________________________
*** CID 1490277: Integer handling issues (OVERFLOW_BEFORE_WIDEN)
/src/mainboard/emulation/qemu-armv7/mainboard.c: 42 in mainboard_enable()
36 printk(BIOS_EMERG, "No dev0; die\n");
37 halt();
38 }
39
40 discovered = probe_ramsize((uintptr_t)_dram, CONFIG_DRAM_SIZE_MB);
41 printk(BIOS_DEBUG, "%d MiB of RAM discovered\n", discovered);
>>> CID 1490277: Integer handling issues (OVERFLOW_BEFORE_WIDEN)
>>> Potentially overflowing expression "discovered * 1048576" with type
>>> "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then used
>>> in a context that expects an expression of type "uint64_t" (64 bits,
>>> unsigned).
42 ram_range(dev, 0, 0x60000000, discovered * MiB);
43 init_gfx();
44 }
45
46 struct chip_operations mainboard_ops = {
47 .enable_dev = mainboard_enable,
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yq2SfQfrHt3Prsn4qSLrYIrajINpiFX8l0vrlNSf8iCrS27qY0Cr0DkycwNUgGZJj8-3DToDL_L-2FDzr14mnrsJO5b1wX1hp9b1MAQygl7x-2B74RAaH2cn0MoEFGAXwEEJbXIrOLILSHQrNwZIfe0nLe1gnLiajaLJrwdHEn9eL-2BliNpkmsWs4cPWclR42874-2F9vKvxtAkOapFk6-2FL32Gg8zoRVYMCESx5LvwouoVUgDEB3QIyO8Dazsn9sAPQ6AJNmcPeD-2BcJ-2Bs7cAawc-2FAuern-2BuVqeYFrtA-3D-3D
_______________________________________________
coreboot mailing list -- [email protected]
To unsubscribe send an email to [email protected]