<p>Patrick Rudolph has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/25222">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lib/lzma: Respect dstn argument<br><br>Don't write more bytes than the caller requests.<br>Based on I484b5c1e3809781033d146609a35a9e5e666c8ed.<br><br>Change-Id: I336de417c7cd6f35cf84947fc4ae161c15bd93ef<br>Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com><br>---<br>M src/lib/lzma.c<br>1 file changed, 2 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/25222/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/lib/lzma.c b/src/lib/lzma.c</span><br><span>index f727553..dbc464c 100644</span><br><span>--- a/src/lib/lzma.c</span><br><span>+++ b/src/lib/lzma.c</span><br><span>@@ -37,6 +37,8 @@</span><br><span>   * byte and re-construct. */</span><br><span>         cp = src + LZMA_PROPERTIES_SIZE;</span><br><span>     outSize = cp[3] << 24 | cp[2] << 16 | cp[1] << 8 | cp[0];</span><br><span style="color: hsl(120, 100%, 40%);">+   if (outSize > dstn)</span><br><span style="color: hsl(120, 100%, 40%);">+                outSize = dstn;</span><br><span>      if (LzmaDecodeProperties(&state.Properties, properties,</span><br><span>                           LZMA_PROPERTIES_SIZE) != LZMA_RESULT_OK) {</span><br><span>          printk(BIOS_WARNING, "lzma: Incorrect stream properties.\n");</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/25222">change 25222</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/25222"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I336de417c7cd6f35cf84947fc4ae161c15bd93ef </div>
<div style="display:none"> Gerrit-Change-Number: 25222 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <patrick.rudolph@9elements.com> </div>