[coreboot-gerrit] Change in coreboot[master]: Coverity: Fix CID1393975

Patrick Rudolph (Code Review) gerrit at coreboot.org
Thu Jul 12 16:01:37 CEST 2018


Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/27449


Change subject: Coverity: Fix CID1393975
......................................................................

Coverity: Fix CID1393975

Fix possible buffer overrun.

Change-Id: I275cabf55fba464be7bd4c21dfe5826ea554ac84
Signed-off-by: Patrick Rudolph <patrick.rudolph at 9elements.com>
---
M src/vendorcode/cavium/bdk/libdram/dram-init-ddr3.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/27449/1

diff --git a/src/vendorcode/cavium/bdk/libdram/dram-init-ddr3.c b/src/vendorcode/cavium/bdk/libdram/dram-init-ddr3.c
index 1c98808..192a8a9 100644
--- a/src/vendorcode/cavium/bdk/libdram/dram-init-ddr3.c
+++ b/src/vendorcode/cavium/bdk/libdram/dram-init-ddr3.c
@@ -2312,7 +2312,7 @@
     seq_ctl.s.seq_sel    = sequence;
 
     VB_PRT(VBL_SEQ, "N%d.LMC%d: Performing LMC sequence=%x: rank_mask=0x%02x, %s\n",
-            node, ddr_interface_num, sequence, rank_mask, sequence_str[sequence]);
+            node, ddr_interface_num, sequence, rank_mask, sequence < 12 ? sequence_str[sequence] : "");
 
     if ((s = lookup_env_parameter("ddr_trigger_sequence%d", sequence)) != NULL) {
             /* FIXME(dhendrix): this appears to be meant for the eval board */

-- 
To view, visit https://review.coreboot.org/27449
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: I275cabf55fba464be7bd4c21dfe5826ea554ac84
Gerrit-Change-Number: 27449
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/ac37a30c/attachment.html>


More information about the coreboot-gerrit mailing list