Change in osmo-bsc[master]: abis_rsl: fix rsl_rx_ccch_load(): properly check the message length

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Mon Jun 21 00:39:09 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24724 )


Change subject: abis_rsl: fix rsl_rx_ccch_load(): properly check the message length
......................................................................

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
---
M src/osmo-bsc/abis_rsl.c
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index ac8006d..f24d1ef 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1946,7 +1946,7 @@
 		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];

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24724
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I35bf0827ff14e84a755c1aa24a6efc06bc7b9f9b
Gerrit-Change-Number: 24724
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210621/a9d91847/attachment.htm>


More information about the gerrit-log mailing list