<p>Felix Held <strong>merged</strong> this change.</p><p><a href="https://review.coreboot.org/28588">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  build bot (Jenkins): Verified
  Patrick Rudolph: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">device/ddr3: Prevent overflow when adding SMBUS Table 17 entries<br><br>Change-Id: If84c6849011106b2a50e504b79cda9cd6a3a9cc3<br>Signed-off-by: Nico Huber <nico.huber@secunet.com><br>Reviewed-on: https://review.coreboot.org/28588<br>Tested-by: build bot (Jenkins) <no-reply@coreboot.org><br>Reviewed-by: Patrick Rudolph <siro@das-labor.org><br>---<br>M src/device/dram/ddr3.c<br>1 file changed, 6 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c</span><br><span>index 63ca964..f27fdcb 100644</span><br><span>--- a/src/device/dram/ddr3.c</span><br><span>+++ b/src/device/dram/ddr3.c</span><br><span>@@ -559,6 +559,12 @@</span><br><span>               memset(mem_info, 0, sizeof(*mem_info));</span><br><span>      }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (mem_info->dimm_cnt >= ARRAY_SIZE(mem_info->dimm)) {</span><br><span style="color: hsl(120, 100%, 40%);">+              printk(BIOS_WARNING, "BUG: Too many DIMM infos for %s.\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                  __func__);</span><br><span style="color: hsl(120, 100%, 40%);">+            return CB_ERR;</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  dimm = &mem_info->dimm[mem_info->dimm_cnt];</span><br><span>        if (info->size_mb) {</span><br><span>              dimm->ddr_type = MEMORY_TYPE_DDR3;</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/28588">change 28588</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/28588"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: If84c6849011106b2a50e504b79cda9cd6a3a9cc3 </div>
<div style="display:none"> Gerrit-Change-Number: 28588 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Nico Huber <nico.h@gmx.de> </div>
<div style="display:none"> Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de> </div>
<div style="display:none"> Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org> </div>
<div style="display:none"> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> </div>