Change in ...osmo-pcu[master]: bts.cpp: ensure left-shift operation does not exceed uint32_t

laforge gerrit-no-reply at lists.osmocom.org
Thu Jul 11 03:22:15 UTC 2019


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 <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190711/aff4fd9b/attachment.html>


More information about the gerrit-log mailing list