aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/osmo-bsc/abis_rsl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 1d71c8330..0e2ffc698 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1514,9 +1514,7 @@ static int rsl_rx_resource_indication(struct msgb *msg)
struct gsm_bts_trx *trx = sign_link->trx;
struct gsm_lchan *lchan;
int ts_nr;
- int i;
-
- rsl_tlv_parse(&tp, rslh->data, msgb_l2len(msg) - sizeof(*rslh));
+ int rc, i;
LOGP(DRSL, LOGL_DEBUG, "%s Rx Resource Indication\n", gsm_trx_name(trx));
@@ -1530,6 +1528,12 @@ static int rsl_rx_resource_indication(struct msgb *msg)
}
}
+ rc = rsl_tlv_parse(&tp, rslh->data, msgb_l2len(msg) - sizeof(*rslh));
+ if (rc < 0) {
+ LOGP(DRSL, LOGL_ERROR, "Rx Resource Indication: failed to parse the message\n");
+ return -EINVAL;
+ }
+
res_info_ie = TLVP_GET(&tp, RSL_IE_RESOURCE_INFO);
if (!res_info_ie) {
LOGP(DRSL, LOGL_ERROR, "Rx Resource Indication: missing Resource Info IE\n");