summaryrefslogtreecommitdiff
path: root/rsa-sign-tr.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2018-12-26 11:04:31 +0100
committerNiels Möller <nisse@lysator.liu.se>2018-12-26 11:04:31 +0100
commitf5a3a224bf00bef5669366d2ae23c2b2b13b8016 (patch)
treea10dca62cb3601b7605acd645fcdc76c374f698a /rsa-sign-tr.c
parent4fc52f4de99b2d471ead06e4a5086b9b15b6dee3 (diff)
downloadnettle-f5a3a224bf00bef5669366d2ae23c2b2b13b8016.tar.gz
Fix accidental use of C99 for loop.
* rsa-sign-tr.c (sec_equal): Fix accidental use of C99 for loop. Reported by Andreas Gustafsson. * testsuite/rsa-sec-decrypt-test.c (test_main): Likewise.
Diffstat (limited to 'rsa-sign-tr.c')
-rw-r--r--rsa-sign-tr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rsa-sign-tr.c b/rsa-sign-tr.c
index 59c9bd07..f824c4ca 100644
--- a/rsa-sign-tr.c
+++ b/rsa-sign-tr.c
@@ -239,8 +239,9 @@ static int
sec_equal(const mp_limb_t *a, const mp_limb_t *b, size_t limbs)
{
volatile mp_limb_t z = 0;
+ size_t i;
- for (size_t i = 0; i < limbs; i++)
+ for (i = 0; i < limbs; i++)
{
z |= (a[i] ^ b[i]);
}