diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-01-04 10:06:09 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-01-06 10:03:30 +0000 |
commit | 6cfa56ba0c887d63c40efbab369541681f13fe21 (patch) | |
tree | f4bf37afd7c481b2a2e6f5fc7abb41ac0fc2b97d | |
parent | 3faa0148054ae47924e20a3c3cae4cdf969ab695 (diff) |
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
-rw-r--r-- | src/gsm/gprs_cipher_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |