<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/21086">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo_bsc_bssap: actually check for lchan<br><br>The function bssmap_handle_cipher_mode() suggests to check if an lchan<br>is actually present when it gets called, but it only checks for conn.<br>This might lead to a segfault later in the execution path.<br><br>Change-Id: I3103ec89cd6dce1a11ea8e9f8187373e4114e852<br>---<br>M src/osmo-bsc/osmo_bsc_bssap.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/86/21086/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c</span><br><span>index f168b65..63dee9e 100644</span><br><span>--- a/src/osmo-bsc/osmo_bsc_bssap.c</span><br><span>+++ b/src/osmo-bsc/osmo_bsc_bssap.c</span><br><span>@@ -487,7 +487,7 @@</span><br><span>  uint8_t enc_bits_msc;</span><br><span>        int chosen_cipher;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-  if (!conn) {</span><br><span style="color: hsl(120, 100%, 40%);">+  if (!conn || !conn->lchan) {</span><br><span>              LOGP(DMSC, LOGL_ERROR, "No lchan/msc_data in cipher mode command.\n");</span><br><span>             return -1;</span><br><span>   }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/21086">change 21086</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/osmo-bsc/+/21086"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I3103ec89cd6dce1a11ea8e9f8187373e4114e852 </div>
<div style="display:none"> Gerrit-Change-Number: 21086 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>