From 31b26934b01c3694973fdba771d0747997df3b25 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 31 Oct 2019 13:52:49 +0100 Subject: [PATCH] fe25519: Fix integer types of fe25519_iszero() Fixes T188 Signed-off-by: Andreas Schneider Reviewed-by: Jakub Jelen --- include/libssh/fe25519.h | 2 +- src/external/fe25519.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/libssh/fe25519.h b/include/libssh/fe25519.h index e959912e..438d85db 100644 --- a/include/libssh/fe25519.h +++ b/include/libssh/fe25519.h @@ -39,7 +39,7 @@ void fe25519_unpack(fe25519 *r, const unsigned char x[32]); void fe25519_pack(unsigned char r[32], const fe25519 *x); -int fe25519_iszero(const fe25519 *x); +uint32_t fe25519_iszero(const fe25519 *x); int fe25519_iseq_vartime(const fe25519 *x, const fe25519 *y); diff --git a/src/external/fe25519.c b/src/external/fe25519.c index 2b0b673e..a7f26c9f 100644 --- a/src/external/fe25519.c +++ b/src/external/fe25519.c @@ -120,10 +120,10 @@ void fe25519_pack(unsigned char r[32], const fe25519 *x) } } -int fe25519_iszero(const fe25519 *x) +uint32_t fe25519_iszero(const fe25519 *x) { int i; - int r; + uint32_t r; fe25519 t = *x; fe25519_freeze(&t);