From 6e122a4d2b82d4dc06c78ac19e1014af6d2938a8 Mon Sep 17 00:00:00 2001 From: zhwangzh <122252660+zhwangzh@users.noreply.github.com> Date: Sun, 19 Feb 2023 18:08:36 +0800 Subject: [PATCH] Update zuc_modes.c In function zuc_eea_encrypt, modify an operator |= to &=. --- src/zuc_modes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zuc_modes.c b/src/zuc_modes.c index ab386742..75f89b73 100644 --- a/src/zuc_modes.c +++ b/src/zuc_modes.c @@ -44,7 +44,7 @@ void zuc_eea_encrypt(const ZUC_UINT32 *in, ZUC_UINT32 *out, size_t nbits, } if (nbits % 32 != 0) { - out[nwords - 1] |= (0xffffffff << (32 - (nbits%32))); + out[nwords - 1] &= (0xffffffff << (32 - (nbits%32))); } }