<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/simtrace2/+/16514">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">qmod DFU: Don't overwrite memory beyond end of usb_strings[]<br><br>The code in board_main_top() for QMOD blindly re-assigned some<br>members of the usb_strings[] array, writing to index 7 and 8.<br><br>However, that array only has those entries in the main firmware,<br>while in DFU that array has only 6 entries.  Depending on whatever<br>the linker has decided to put in the next memory location after<br>that array, we would overwrite that very early during boot-up.<br><br>Change-Id: I59e4e1a54e819808d5a8259a6d14f4b970a90020<br>Related: OS#4302<br>---<br>M firmware/libboard/qmod/source/board_qmod.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://gerrit.osmocom.org:29418/simtrace2 refs/changes/14/16514/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c</span><br><span>index 0565c92..0b03180 100644</span><br><span>--- a/firmware/libboard/qmod/source/board_qmod.c</span><br><span>+++ b/firmware/libboard/qmod/source/board_qmod.c</span><br><span>@@ -332,11 +332,13 @@</span><br><span>           TRACE_INFO("Detected Quad-Modem ST12\n\r");</span><br><span>        } else {</span><br><span>             TRACE_INFO("Detected Quad-Modem ST34\n\r");</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef APPLICATION_dfu</span><br><span>               /* make sure we use the second set of USB Strings</span><br><span>             * calling the interfaces "Modem 3" and "Modem 4" rather</span><br><span>                  * than 1+2 */</span><br><span>               usb_strings[7] = usb_strings[9];</span><br><span>             usb_strings[8] = usb_strings[10];</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span>    }</span><br><span> </span><br><span>        /* Obtain the circuit board version (currently just prints voltage */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/simtrace2/+/16514">change 16514</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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://gerrit.osmocom.org/c/simtrace2/+/16514"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: simtrace2 </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I59e4e1a54e819808d5a8259a6d14f4b970a90020 </div>
<div style="display:none"> Gerrit-Change-Number: 16514 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>