diff options
author | Niels Möller <nisse@lysator.liu.se> | 2018-12-26 11:04:31 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2018-12-26 11:04:31 +0100 |
commit | f5a3a224bf00bef5669366d2ae23c2b2b13b8016 (patch) | |
tree | a10dca62cb3601b7605acd645fcdc76c374f698a /rsa-sign-tr.c | |
parent | 4fc52f4de99b2d471ead06e4a5086b9b15b6dee3 (diff) | |
download | nettle-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.c | 3 |
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]); } |