From 5b8080208ad150c2892f6fccaba8bc91ddd8320f Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Wed, 2 Jun 2021 20:08:04 +0200 Subject: [PATCH] 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 --- src/osmo-bts-trx/trx_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index c10a15fa0..afd630f03 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -1154,8 +1154,8 @@ int trx_if_send_burst(struct trx_l1h *l1h, const struct trx_dl_burst_req *br) 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)