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
This commit is contained in:
Harald Welte 2017-01-04 10:06:09 +01:00
parent 3faa014805
commit 6cfa56ba0c
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}