aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-04-14 23:45:01 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2021-05-27 17:06:21 +0200
commitd587574d7b9613f2cc733aa4a82d5a9c6f068193 (patch)
treeb3ec37d0dbfc100ea718bdfec00a8625083a9307
parent1de1c038cf87f6741e1599b74f64128b41b2cfc5 (diff)
potential segfault: vty chan act: do not set AMR bits for EFR
The amr_mode parameter may be passed as -1 and is directly used as an array index in amr_modes[]. The AMR related switch case properly checks against a -1 index, but the EFR does not -- and should not use s15_s0. Change-Id: I9bae5b4fb8ab8c2002fe785e130dc9faeeda892c
-rw-r--r--src/osmo-bsc/bsc_vty.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index c482fb948..b964dbc9e 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -6078,7 +6078,6 @@ static int lchan_act_single(struct vty *vty, struct gsm_lchan *lchan, const char
info = (struct lchan_activate_info) {
.activ_for = ACTIVATE_FOR_VTY,
.chan_mode = GSM48_CMODE_SPEECH_EFR,
- .s15_s0 = amr_modes[amr_mode],
.requires_voice_stream = false,
};
} else if (!strcmp(codec_str, "amr")) {