summary refs log tree commit diff
path: root/crypto/src/bcpg/SignatureSubpacketsReader.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2020-02-20 01:05:05 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2020-02-20 01:05:05 +0700
commitaac29ea7c78c14d97a9d3b2f2a91e28750dd7bba (patch)
tree0f07b214366a3efbc71e8965b15284c27d41594d /crypto/src/bcpg/SignatureSubpacketsReader.cs
parentMark several EC multipliers as obsolete (diff)
downloadBouncyCastle.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.cs3
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];
 
             //