summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2017-06-09 12:58:17 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2017-06-09 12:58:17 +0700
commitb5b1ad3e9abdaada947513b5a4940e93c4aae210 (patch)
tree60ef6c08160cfecd581a1a2a906b1836d0e454ab /crypto/src
parentComments (diff)
downloadBouncyCastle.NET-ed25519-b5b1ad3e9abdaada947513b5a4940e93c4aae210.tar.xz
Add explicit length check on OAEP input
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/crypto/encodings/OaepEncoding.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/src/crypto/encodings/OaepEncoding.cs b/crypto/src/crypto/encodings/OaepEncoding.cs
index cb23b1710..9f5c563c2 100644
--- a/crypto/src/crypto/encodings/OaepEncoding.cs
+++ b/crypto/src/crypto/encodings/OaepEncoding.cs
@@ -137,6 +137,8 @@ namespace Org.BouncyCastle.Crypto.Encodings
             int		inOff,
             int		inLen)
         {
+            Check.DataLength(inLen > GetInputBlockSize(), "input data too long");
+
             byte[] block = new byte[GetInputBlockSize() + 1 + 2 * defHash.Length];
 
             //