laforge has submitted this change and it was merged. (
https://gerrit.osmocom.org/c/osmo-pcu/+/14906 )
Change subject: ubsan: fix shift
......................................................................
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
---
M src/bts.cpp
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/bts.cpp b/src/bts.cpp
index 395fc73..26dd401 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -551,7 +551,7 @@
}
/* get TLLI from downlink assignment */
- tlli = ((*data++) & 0xf) << 28;
+ tlli = (uint32_t)((*data++) & 0xf) << 28;
tlli |= (*data++) << 20;
tlli |= (*data++) << 12;
tlli |= (*data++) << 4;
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14906
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I6387c7313832f6c7c920e1016b74562b66d6b68e
Gerrit-Change-Number: 14906
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged