diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-03-16 11:31:21 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-03-16 11:31:21 +0700 |
commit | 32ada34bce57d83a54d65c27561a5a39d0302992 (patch) | |
tree | ba930d408794632fa9395dfb065bc94339c621b6 /crypto/src/asn1 | |
parent | Refactor EdDsaSigner (diff) | |
download | BouncyCastle.NET-ed25519-32ada34bce57d83a54d65c27561a5a39d0302992.tar.xz |
Fix non-8-aligned IPv4 netmask parsing
- see https://github.com/bcgit/bc-csharp/issues/426
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r-- | crypto/src/asn1/x509/GeneralName.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/asn1/x509/GeneralName.cs b/crypto/src/asn1/x509/GeneralName.cs index 62d650df0..3f5a35d37 100644 --- a/crypto/src/asn1/x509/GeneralName.cs +++ b/crypto/src/asn1/x509/GeneralName.cs @@ -337,7 +337,7 @@ namespace Org.BouncyCastle.Asn1.X509 } if (bits > 0) { - addr[offset] = (byte)(byte.MaxValue >> (8 - bits)); + addr[offset] = (byte)(0xFF00 >> bits); } } |