laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14744 )

Change subject: bts.cpp: ensure left-shift operation does not exceed uint32_t
......................................................................

bts.cpp: ensure left-shift operation does not exceed uint32_t

Found by Asan
Relates: OS#4029
Change-Id: I21640e40e689016d6fb80a8db4257b22e85b303b
---
M src/bts.cpp
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/bts.cpp b/src/bts.cpp
index e07b840..8799c3d 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -551,7 +551,7 @@
        }

        /* get TLLI from downlink assignment */
-       tlli = (*data++) << 28;
+       tlli = ((*data++) & 0xf) << 28;
        tlli |= (*data++) << 20;
        tlli |= (*data++) << 12;
        tlli |= (*data++) << 4;

--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14744
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I21640e40e689016d6fb80a8db4257b22e85b303b
Gerrit-Change-Number: 14744
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged

Reply via email to