diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2020-02-20 01:05:05 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2020-02-20 01:05:05 +0700 |
commit | aac29ea7c78c14d97a9d3b2f2a91e28750dd7bba (patch) | |
tree | 0f07b214366a3efbc71e8965b15284c27d41594d /crypto/src/bcpg/SignatureSubpacketsReader.cs | |
parent | Mark several EC multipliers as obsolete (diff) | |
download | BouncyCastle.NET-ed25519-aac29ea7c78c14d97a9d3b2f2a91e28750dd7bba.tar.xz |
PGP updates from bc-java
Diffstat (limited to 'crypto/src/bcpg/SignatureSubpacketsReader.cs')
-rw-r--r-- | crypto/src/bcpg/SignatureSubpacketsReader.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/src/bcpg/SignatureSubpacketsReader.cs b/crypto/src/bcpg/SignatureSubpacketsReader.cs index 80bedb07c..45dc96885 100644 --- a/crypto/src/bcpg/SignatureSubpacketsReader.cs +++ b/crypto/src/bcpg/SignatureSubpacketsReader.cs @@ -52,6 +52,9 @@ namespace Org.BouncyCastle.Bcpg if (tag < 0) throw new EndOfStreamException("unexpected EOF reading signature sub packet"); + if (bodyLen <= 0) + throw new EndOfStreamException("out of range data found in signature sub packet"); + byte[] data = new byte[bodyLen - 1]; // |