<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11386">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bssap: check for zero length speech codec lists.<br><br>The specification implicitly allows speech codec lists with 0 elements.<br>When a speech codec list is included in the message, we should check if<br>it actually contains speech codec elements.<br><br>- Reject speech codec lists that do contain 0 elements<br><br>Change-Id: I2aca205dfdf5c7de7cb48ea2b57eb54e678e12fc<br>Related: OS#3657<br>---<br>M src/osmo-bsc/osmo_bsc_bssap.c<br>1 file changed, 7 insertions(+), 0 deletions(-)<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/11386/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 537b851..282f1c5 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>@@ -696,6 +696,13 @@</span><br><span>                            cause = GSM0808_CAUSE_INCORRECT_VALUE;</span><br><span>                               goto reject;</span><br><span>                         }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+                   if (conn->codec_list.len <= 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+                                LOGP(DMSC, LOGL_ERROR, "Speech codec list does not contain any codecs\n");</span><br><span style="color: hsl(120, 100%, 40%);">+                          cause = GSM0808_CAUSE_INCORRECT_VALUE;</span><br><span style="color: hsl(120, 100%, 40%);">+                                goto reject;</span><br><span style="color: hsl(120, 100%, 40%);">+                  }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>          }</span><br><span> </span><br><span>                if (aoip && !conn->codec_list.len) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11386">change 11386</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/11386"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I2aca205dfdf5c7de7cb48ea2b57eb54e678e12fc </div>
<div style="display:none"> Gerrit-Change-Number: 11386 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>