From eeb1f2692493bfeffac2411542de41c7dc73bc6b Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 20 Feb 2019 01:02:54 +0100 Subject: [PATCH] Explicit cast --- src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c index 10531d48..f04cdfa6 100644 --- a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c +++ b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c @@ -529,7 +529,7 @@ equal(signed char b, signed char c) unsigned char ub = b; unsigned char uc = c; unsigned char x = ub ^ uc; /* 0: yes; 1..255: no */ - uint32_t y = x; /* 0: yes; 1..255: no */ + uint32_t y = (uint32_t) x; /* 0: yes; 1..255: no */ y -= 1; /* 4294967295: yes; 0..254: no */ y >>= 31; /* 1: yes; 0: no */