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
Wed Jun 23 11:44:43 UTC 2021


fixeria has submitted this change. ( 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(-)

Approvals:
  dexter: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 86b1790..0d92141 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1987,7 +1987,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: 2
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210623/0e2b74d3/attachment.htm>


More information about the gerrit-log mailing list