<p>Vadim Yanitskiy has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11216">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">layer23/l1ctl.c: fix: verify msg length against l1ctl_hdr<br><br>In l1ctl_recv() we actually expect to 'see' the L1CTL header<br>instead of the DL info header. Let's fix this.<br><br>Change-Id: Ic7d017bef04f3c186565d5dade36959df1019bd8<br>---<br>M src/host/layer23/src/common/l1ctl.c<br>1 file changed, 1 insertion(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/16/11216/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c</span><br><span>index 39b7f3c..9a3bc0e 100644</span><br><span>--- a/src/host/layer23/src/common/l1ctl.c</span><br><span>+++ b/src/host/layer23/src/common/l1ctl.c</span><br><span>@@ -873,9 +873,8 @@</span><br><span> {</span><br><span>        int rc = 0;</span><br><span>  struct l1ctl_hdr *l1h;</span><br><span style="color: hsl(0, 100%, 40%);">-  struct l1ctl_info_dl *dl;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   if (msgb_l2len(msg) < sizeof(*dl)) {</span><br><span style="color: hsl(120, 100%, 40%);">+       if (msgb_l2len(msg) < sizeof(*l1h)) {</span><br><span>             LOGP(DL1C, LOGL_ERROR, "Short Layer2 message: %u\n",</span><br><span>                       msgb_l2len(msg));</span><br><span>            msgb_free(msg);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11216">change 11216</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/11216"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmocom-bb </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic7d017bef04f3c186565d5dade36959df1019bd8 </div>
<div style="display:none"> Gerrit-Change-Number: 11216 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>