aboutsummaryrefslogtreecommitdiffstats
path: root/src/bts.cpp
diff options
context:
space:
mode:
authorEric Wild <ewild@sysmocom.de>2019-07-23 17:16:06 +0200
committerlaforge <laforge@gnumonks.org>2019-07-24 19:28:38 +0000
commitab8b01effdce38a19385e6a58e3b719a57710b02 (patch)
treec598400c00a17057f725ec4f877681a9a3881142 /src/bts.cpp
parent7b7f2048b887c0228f5fc7b43bafe6a983f2c06c (diff)
ubsan: fix shift
Ubsan complains about shifts into the sign bit due to automatic int promotion, so cast explicitly. Change-Id: I6387c7313832f6c7c920e1016b74562b66d6b68e Related: OS#4029
Diffstat (limited to 'src/bts.cpp')
-rw-r--r--src/bts.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 395fc733..26dd4015 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -551,7 +551,7 @@ int BTS::rcv_imm_ass_cnf(const uint8_t *data, uint32_t fn)
}
/* get TLLI from downlink assignment */
- tlli = ((*data++) & 0xf) << 28;
+ tlli = (uint32_t)((*data++) & 0xf) << 28;
tlli |= (*data++) << 20;
tlli |= (*data++) << 12;
tlli |= (*data++) << 4;