diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-11-19 13:31:40 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-11-19 13:54:36 +0700 |
commit | 8a98255fb5f170aece4ce348530188b53d9e4352 (patch) | |
tree | 8eb2416d77d301bc8fb09c1b04f83fc3a276a076 /src | |
parent | b37b3263a917aa554f99315e847f5accc470e10b (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
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bts-trx/trx_if.c | 4 |
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; |