gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] 02/02: nacl: apply fix for overflow


From: gnunet
Subject: [taler-wallet-core] 02/02: nacl: apply fix for overflow
Date: Thu, 07 Jan 2021 15:06:03 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

commit a3313ce3f89208399b9c776ffdeac6bf8a889e34
Author: Florian Dold <florian@dold.me>
AuthorDate: Thu Jan 7 15:05:36 2021 +0100

    nacl: apply fix for overflow
    
    See https://github.com/dchest/tweetnacl-js/issues/187
---
 packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts 
b/packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts
index c2d40691..315e2bba 100644
--- a/packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts
+++ b/packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts
@@ -1548,7 +1548,7 @@ function modL(r: Uint8Array, x: Float64Array): void {
     carry = 0;
     for (j = i - 32, k = i - 12; j < k; ++j) {
       x[j] += carry - 16 * x[i] * L[j - (i - 32)];
-      carry = (x[j] + 128) >> 8;
+      carry = Math.floor((x[j] + 128) / 256);
       x[j] -= carry * 256;
     }
     x[j] += carry;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]