From e87f20f621a9c7dbe677da42264a75c31397cbf1 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Mon, 21 Jun 2021 02:37:42 +0200 Subject: abis_rsl: fix rsl_rx_ccch_load(): properly check the message length msg->data_len is the total number of bytes available in the buffer, not the actual length of the payload. Use msgb_length(). Change-Id: I35bf0827ff14e84a755c1aa24a6efc06bc7b9f9b --- src/osmo-bsc/abis_rsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/osmo-bsc/abis_rsl.c') diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 86b179067..0d921413a 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1987,7 +1987,7 @@ static int rsl_rx_ccch_load(struct msgb *msg) osmo_signal_dispatch(SS_CCCH, S_CCCH_PAGING_LOAD, &sd); break; case RSL_IE_RACH_LOAD: - if (msg->data_len >= 7) { + if (msgb_length(msg) >= 7) { int32_t busy_percent, access_percent; /* build data for signal */ sd.rach_slot_count = rslh->data[2] << 8 | rslh->data[3]; -- cgit v1.2.3