[MERGED] osmo-bts[master]: fix nullpointer deref in rsl_tx_mode_modif_nack()

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Jan 26 18:21:13 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: fix nullpointer deref in rsl_tx_mode_modif_nack()
......................................................................


fix nullpointer deref in rsl_tx_mode_modif_nack()

The function rsl_tx_mode_modif_nack() uses abis_bts_rsl_sendmsg().
This function relys on msg->trx to be set (see abis.c). However,
rsl_tx_mode_modif_nack() creates the message buffer, but does
not set msg->trx.

- Make sure that msg->trx is set properly

Change-Id: Ib5990db11df1b25dc5d321193731426b11f8005a
---
M src/common/rsl.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/rsl.c b/src/common/rsl.c
index 1f45cc6..3d0993c 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1248,6 +1248,7 @@
 	msgb_tlv_put(msg, RSL_IE_CAUSE, 1, &cause);
 	rsl_dch_push_hdr(msg, RSL_MT_MODE_MODIFY_NACK, chan_nr);
 	msg->lchan = lchan;
+	msg->trx = lchan->ts->trx;
 
 	return abis_bts_rsl_sendmsg(msg);
 }

-- 
To view, visit https://gerrit.osmocom.org/6096
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5990db11df1b25dc5d321193731426b11f8005a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list