diff options
Diffstat (limited to 'crypto/src/bcpg')
-rw-r--r-- | crypto/src/bcpg/ECPublicBCPGKey.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/src/bcpg/ECPublicBCPGKey.cs b/crypto/src/bcpg/ECPublicBCPGKey.cs index df19caac3..4733ee6c9 100644 --- a/crypto/src/bcpg/ECPublicBCPGKey.cs +++ b/crypto/src/bcpg/ECPublicBCPGKey.cs @@ -85,6 +85,8 @@ namespace Org.BouncyCastle.Bcpg throw new EndOfStreamException(); if (length == 0 || length == 0xFF) throw new IOException("future extensions not yet implemented"); + if (length > 127) + throw new IOException("unsupported OID"); byte[] buffer = new byte[length + 2]; bcpgIn.ReadFully(buffer, 2, buffer.Length - 2); |