diff options
author | Harald Welte <laforge@osmocom.org> | 2021-01-03 10:27:22 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2021-01-03 10:28:55 +0100 |
commit | ecf4879403fb328658fcdfadc63669d8f8a2ee77 (patch) | |
tree | 158021b9a77965ec3f2f69a7f85335a833c43f76 | |
parent | sysinfo.c: Fix SI4 GPRS patching which overwrote CBCH IE (diff) | |
download | OsmoBTS-ecf4879403fb328658fcdfadc63669d8f8a2ee77.tar.xz OsmoBTS-ecf4879403fb328658fcdfadc63669d8f8a2ee77.zip |
fix-up missed review comment in CBCH SI4 patching fix
This is a follow-up fix for I0ee0cf736e2fb74a6759a68101f699b4ec2ef54e
get_si4_ro_offset() itself already checks if it's less than GSM_MACBLOCK_LEN,
so we must check if it's not negative.
Change-Id: Iba99e5de625af6bed6720a38fec26c2acc6251c0
-rw-r--r-- | src/common/rsl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c index 8e27e777..29b64b46 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -382,7 +382,7 @@ static int rsl_rx_bcch_info(struct gsm_bts_trx *trx, struct msgb *msg) /* decode original SI4 Rest Octets as sent by BSC */ const uint8_t *si4 = (uint8_t *) GSM_BTS_SI(bts, osmo_si); int si4_ro_offset = get_si4_ro_offset(si4); - if (si4_ro_offset < GSM_MACBLOCK_LEN) { + if (si4_ro_offset > 0) { osmo_gsm48_rest_octets_si4_decode(&bts->si4_ro_decoded, si4 + si4_ro_offset, GSM_MACBLOCK_LEN - si4_ro_offset); |