From 063306c695e0722fb3dbac1a4e184bc48c49d8b0 Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Sun, 3 Feb 2019 11:59:02 +0100 Subject: [PATCH] Wrong array size in function argument Fixes #114 Most proably harmless, but nevertheless ugly. --- src/monocypher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/monocypher.c b/src/monocypher.c index 4e44836..b216c26 100644 --- a/src/monocypher.c +++ b/src/monocypher.c @@ -82,7 +82,7 @@ static u64 x16(const u8 a[16], const u8 b[16]) return (load64_le(a + 0) ^ load64_le(b + 0)) | (load64_le(a + 8) ^ load64_le(b + 8)); } -static u64 x32(const u8 a[16],const u8 b[16]){return x16(a,b)| x16(a+16, b+16);} +static u64 x32(const u8 a[32],const u8 b[32]){return x16(a,b)| x16(a+16, b+16);} static u64 x64(const u8 a[64],const u8 b[64]){return x32(a,b)| x32(a+32, b+32);} int crypto_verify16(const u8 a[16], const u8 b[16]){ return neq0(x16(a, b)); } int crypto_verify32(const u8 a[32], const u8 b[32]){ return neq0(x32(a, b)); } -- 2.47.3