summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormamonet <maamoun.tk@gmail.com>2021-06-04 09:36:15 +0000
committermamonet <maamoun.tk@gmail.com>2021-06-04 09:36:15 +0000
commit6bc296fba593bd507e5ff96c2110e345173486e6 (patch)
treed2be4220a96d97cd7a1b73139e0f8697eb712c4c
parent4a50520a43d1290244a952c02fd86ee3feb744a6 (diff)
downloadnss-hg-6bc296fba593bd507e5ff96c2110e345173486e6.tar.gz
Bug 1566124 - Fix counter increase in ppc-gcm-wrap.c r=bbeurdouche
Differential Revision: https://phabricator.services.mozilla.com/D116297
-rw-r--r--lib/freebl/ppc-gcm-wrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/freebl/ppc-gcm-wrap.c b/lib/freebl/ppc-gcm-wrap.c
index ca3d8ee69..ac58744cb 100644
--- a/lib/freebl/ppc-gcm-wrap.c
+++ b/lib/freebl/ppc-gcm-wrap.c
@@ -155,7 +155,7 @@ ppc_aes_gcmInitCounter(ppc_AES_GCMContext *gcm,
/* Promote the counter by 1 */
gcm->CTR[14] += !(++gcm->CTR[15]);
gcm->CTR[13] += !(gcm->CTR[15]) && !(gcm->CTR[14]);
- gcm->CTR[12] += !(gcm->CTR[15]) && !(gcm->CTR[13]) && !(gcm->CTR[12]);
+ gcm->CTR[12] += !(gcm->CTR[15]) && !(gcm->CTR[14]) && !(gcm->CTR[13]);
/* Now hash AAD - it would actually make sense to seperate the context
* creation from the AAD, because that would allow to reuse the H, which