summary refs log tree commit diff
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--crypto/src/asn1/DefiniteLengthInputStream.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/asn1/DefiniteLengthInputStream.cs b/crypto/src/asn1/DefiniteLengthInputStream.cs
index e3b9b5737..0e4d4c41f 100644
--- a/crypto/src/asn1/DefiniteLengthInputStream.cs
+++ b/crypto/src/asn1/DefiniteLengthInputStream.cs
@@ -86,7 +86,7 @@ namespace Org.BouncyCastle.Asn1
             if (_remaining >= limit)
                 throw new IOException("corrupted stream - out of bounds length found: " + _remaining + " >= " + limit);
 
-            if ((_remaining -= Streams.ReadFully(_in, buf)) != 0)
+            if ((_remaining -= Streams.ReadFully(_in, buf, 0, buf.Length)) != 0)
                 throw new EndOfStreamException("DEF length " + _originalLength + " object truncated by " + _remaining);
             SetParentEofDetect(true);
         }
@@ -102,7 +102,7 @@ namespace Org.BouncyCastle.Asn1
                 throw new IOException("corrupted stream - out of bounds length found: " + _remaining + " >= " + limit);
 
             byte[] bytes = new byte[_remaining];
-			if ((_remaining -= Streams.ReadFully(_in, bytes)) != 0)
+			if ((_remaining -= Streams.ReadFully(_in, bytes, 0, bytes.Length)) != 0)
 				throw new EndOfStreamException("DEF length " + _originalLength + " object truncated by " + _remaining);
 			SetParentEofDetect(true);
 			return bytes;