]> git.codecow.com Git - Monocypher.git/commitdiff
Wrong array size in function argument
authorLoup Vaillant <loup@loup-vaillant.fr>
Sun, 3 Feb 2019 10:59:02 +0000 (11:59 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sun, 3 Feb 2019 11:00:32 +0000 (12:00 +0100)
Fixes #114

Most proably harmless, but nevertheless ugly.

src/monocypher.c

index 4e4483654e54650d7b093fb98b3e9fa816364523..b216c26cd86075dc1931f8ab1a2ac61eab9001b7 100644 (file)
@@ -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)); }