dexter has uploaded this change for review. ( https://gerrit.osmocom.org/11386


Change subject: bssap: check for zero length speech codec lists.
......................................................................

bssap: check for zero length speech codec lists.

The specification implicitly allows speech codec lists with 0 elements.
When a speech codec list is included in the message, we should check if
it actually contains speech codec elements.

- Reject speech codec lists that do contain 0 elements

Change-Id: I2aca205dfdf5c7de7cb48ea2b57eb54e678e12fc
Related: OS#3657
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 7 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/86/11386/1

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 537b851..282f1c5 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -696,6 +696,13 @@
                                cause = GSM0808_CAUSE_INCORRECT_VALUE;
                                goto reject;
                        }
+
+                       if (conn->codec_list.len <= 0) {
+                               LOGP(DMSC, LOGL_ERROR, "Speech codec list does 
not contain any codecs\n");
+                               cause = GSM0808_CAUSE_INCORRECT_VALUE;
+                               goto reject;
+                       }
+
                }

                if (aoip && !conn->codec_list.len) {

--
To view, visit https://gerrit.osmocom.org/11386
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2aca205dfdf5c7de7cb48ea2b57eb54e678e12fc
Gerrit-Change-Number: 11386
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>

Reply via email to