summaryrefslogtreecommitdiff
path: root/src/common/aes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/aes.c')
-rw-r--r--src/common/aes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/aes.c b/src/common/aes.c
index 037d7b3061..590d304837 100644
--- a/src/common/aes.c
+++ b/src/common/aes.c
@@ -122,9 +122,9 @@ aes_get_counter(aes_cnt_cipher_t *cipher)
void
aes_set_counter(aes_cnt_cipher_t *cipher, u64 counter)
{
- cipher->pos = counter & 0x0f;
- cipher->counter0 = (counter >> 4) & 0xffffffff;
- cipher->counter1 = (counter >> 36);
+ cipher->pos = (u8)(counter & 0x0f);
+ cipher->counter0 = (u32) ((counter >> 4) & 0xffffffff);
+ cipher->counter1 = (u32) (counter >> 36);
_aes_fill_buf(cipher);
}