Change in osmo-bts[master]: osmo-bts-trx: fix NULL pointer dereference in trx_if_send_burst()

fixeria gerrit-no-reply at lists.osmocom.org
Wed Jun 2 18:17:29 UTC 2021


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


Change subject: osmo-bts-trx: fix NULL pointer dereference in trx_if_send_burst()
......................................................................

osmo-bts-trx: fix NULL pointer dereference in trx_if_send_burst()

Starting from TRXDv2 [1], trx_if_send_burst() would keep batching
PDUs to the static buffer, unless it's called with br = NULL, so
we cannot dereference br in the logging statement.

Of course, we could also store TDMA frame number in a static
variable, but I don't think it's worth it just for logging.

Change-Id: I4a361777fc40bdedcebbe54df6274bc5573f77a8
Fixes: [1] I9b4cc8e10cd683b28d22e32890569484cd20372d
Fixes: CID#236232
---
M src/osmo-bts-trx/trx_if.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/15/24515/1

diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index af1deef..591db72 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -1142,8 +1142,8 @@
 
 sendall:
 	LOGPPHI(l1h->phy_inst, DTRX, LOGL_DEBUG,
-		"Tx TRXDv%u datagram with %u PDU(s): fn=%u\n",
-		pdu_ver, pdu_num, br->fn);
+		"Tx TRXDv%u datagram with %u PDU(s)\n",
+		pdu_ver, pdu_num);
 
 	/* TRXDv2: unset BATCH.ind in the last PDU */
 	if (pdu_ver >= 2)

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I4a361777fc40bdedcebbe54df6274bc5573f77a8
Gerrit-Change-Number: 24515
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/20210602/b979bd83/attachment.htm>


More information about the gerrit-log mailing list