aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-11-19 13:31:40 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-11-19 13:54:36 +0700
commit8a98255fb5f170aece4ce348530188b53d9e4352 (patch)
tree8eb2416d77d301bc8fb09c1b04f83fc3a276a076
parentb37b3263a917aa554f99315e847f5accc470e10b (diff)
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
-rw-r--r--src/osmo-bts-trx/trx_if.c4
1 files changed, 3 insertions, 1 deletions
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;