From 8a98255fb5f170aece4ce348530188b53d9e4352 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 19 Nov 2019 13:31:40 +0700 Subject: osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind A NOPE.ind indicates absence of an Uplink burst, thus it does not carry a burst. Let's init the burst length to avoid uninitialized memory access in the scheduler code. Change-Id: I77f686bf7df385215892e71733a28ff0d90d7222 Fixes: CID#205857 --- src/osmo-bts-trx/trx_if.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index dbf78058..5854c064 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -1018,8 +1018,10 @@ static int trx_data_read_cb(struct osmo_fd *ofd, unsigned int what) if (hdr_len < 0) return hdr_len; - if (bi.flags & TRX_BI_F_NOPE_IND) + if (bi.flags & TRX_BI_F_NOPE_IND) { + bi.burst_len = 0; goto skip_burst; + } /* We're done with the header now */ buf_len -= hdr_len; -- cgit v1.2.3