diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-30 21:13:15 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-30 21:13:15 +0700 |
commit | 58731f422dcec68b2a7e0caab799c0a1371daee1 (patch) | |
tree | 3684372f12bac29d0571c79d1555c9e1c649af4f /crypto/src | |
parent | Formatting (diff) | |
download | BouncyCastle.NET-ed25519-58731f422dcec68b2a7e0caab799c0a1371daee1.tar.xz |
Fix GetBit range-check
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/math/ec/Nat.cs | 2 |
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; } |