From 6cfa56ba0c887d63c40efbab369541681f13fe21 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 4 Jan 2017 10:06:09 +0100 Subject: gprs_cipher_core: Use typecase to avoid sanitizer error This resolves gprs_cipher_core.c:118:37: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Change-Id: Ib1866595030ad9d11c886621ce69632462befa3a --- src/gsm/gprs_cipher_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gsm/gprs_cipher_core.c b/src/gsm/gprs_cipher_core.c index 8f020b38..da6e0a83 100644 --- a/src/gsm/gprs_cipher_core.c +++ b/src/gsm/gprs_cipher_core.c @@ -115,7 +115,7 @@ int gprs_cipher_supported(enum gprs_ciph_algo algo) /* GSM TS 04.64 / Section A.2.1 : Generation of 'input' */ uint32_t gprs_cipher_gen_input_ui(uint32_t iov_ui, uint8_t sapi, uint32_t lfn, uint32_t oc) { - uint32_t sx = ((1<<27) * sapi) + (1<<31); + uint32_t sx = ((1<<27) * sapi) + ((uint32_t ) 1<<31); return (iov_ui ^ sx) + lfn + oc; } -- cgit v1.2.3