summary refs log tree commit diff
path: root/crypto/src/math
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-01-30 21:13:15 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-01-30 21:13:15 +0700
commit58731f422dcec68b2a7e0caab799c0a1371daee1 (patch)
tree3684372f12bac29d0571c79d1555c9e1c649af4f /crypto/src/math
parentFormatting (diff)
downloadBouncyCastle.NET-ed25519-58731f422dcec68b2a7e0caab799c0a1371daee1.tar.xz
Fix GetBit range-check
Diffstat (limited to 'crypto/src/math')
-rw-r--r--crypto/src/math/ec/Nat.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/math/ec/Nat.cs b/crypto/src/math/ec/Nat.cs
index 567c2bc00..599d929c2 100644
--- a/crypto/src/math/ec/Nat.cs
+++ b/crypto/src/math/ec/Nat.cs
@@ -135,7 +135,7 @@ namespace Org.BouncyCastle.Math.EC
                 return x[0] & 1;
             }
             int w = bit >> 5;
-            if ((w - Int32.MinValue) > x.Length)
+            if (w < 0 || w >= x.Length)
             {
                 return 0;
             }