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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Wed Jul 10 19:04:08 UTC 2019


lynxis lazus has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/44/14744/1

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: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190710/cc6864aa/attachment.htm>


More information about the gerrit-log mailing list