[coreboot-gerrit] Change in coreboot[master]: Coverity: Fix CID1393976
Patrick Rudolph (Code Review)
gerrit at coreboot.org
Thu Jul 12 16:01:36 CEST 2018
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/27447
Change subject: Coverity: Fix CID1393976
......................................................................
Coverity: Fix CID1393976
Cast to u64 to prevent possible integer overflow.
Change-Id: I5c7d25278db54523242314cba6c85ac2f7a6c1f3
Signed-off-by: Patrick Rudolph <patrick.rudolph at 9elements.com>
---
M src/soc/cavium/cn81xx/clock.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/27447/1
diff --git a/src/soc/cavium/cn81xx/clock.c b/src/soc/cavium/cn81xx/clock.c
index bd6514c..02f152f 100644
--- a/src/soc/cavium/cn81xx/clock.c
+++ b/src/soc/cavium/cn81xx/clock.c
@@ -63,7 +63,7 @@
rst_boot.u = read64((void *)RST_PF_BAR0);
- return rst_boot.s.pnr_mul * PLL_REF_CLK;
+ return ((u64)rst_boot.s.pnr_mul) * PLL_REF_CLK;
}
/**
@@ -75,5 +75,5 @@
rst_boot.u = read64((void *)RST_PF_BAR0);
- return rst_boot.s.c_mul * PLL_REF_CLK;
+ return ((u64)rst_boot.s.c_mul) * PLL_REF_CLK;
}
--
To view, visit https://review.coreboot.org/27447
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c7d25278db54523242314cba6c85ac2f7a6c1f3
Gerrit-Change-Number: 27447
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph at 9elements.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180712/6ef5bbf3/attachment-0001.html>
More information about the coreboot-gerrit
mailing list