From f62f5ceb048350a62c2fef811fe5d5c0ed73c55d Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Mar 2013 13:28:03 -0700 Subject: [PATCH] 1L << 51 is an undefined behavior. Use 1 as a int64_t value. --- src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult.c b/src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult.c index 6d26956b..72fe5d15 100644 --- a/src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult.c +++ b/src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult.c @@ -42,7 +42,7 @@ static void fsum(felem *output, const felem *in) { * (note the order of the arguments!) */ static void fdifference_backwards(felem *ioutput, const felem *iin) { - static const int64_t twotothe51 = (1l << 51); + static const int64_t twotothe51 = ((int64_t) 1) << 51; const int64_t *in = (const int64_t *) iin; int64_t *out = (int64_t *) ioutput;