Skip to content

Commit 6e1342f

Browse files
committed
removed range check as it failed to take account of buffering.
1 parent d994470 commit 6e1342f

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

core/src/main/java/org/bouncycastle/crypto/BufferedBlockCipher.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package org.bouncycastle.crypto;
22

3-
import org.bouncycastle.util.Arrays;
4-
53
/**
64
* A wrapper class that allows block ciphers to be used to process data in
75
* a piecemeal fashion. The BufferedBlockCipher outputs a block only when the
@@ -241,7 +239,7 @@ public int processBytes(
241239
len -= gapLen;
242240
}
243241

244-
if (in == out && Arrays.segmentsOverlap(inOff, len, outOff, length))
242+
if (in == out)
245243
{
246244
in = new byte[len];
247245
System.arraycopy(out, inOff, in, 0, len);

core/src/main/java/org/bouncycastle/crypto/DefaultBufferedBlockCipher.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package org.bouncycastle.crypto;
22

3-
import org.bouncycastle.util.Arrays;
4-
53
/**
64
* A wrapper class that allows block ciphers to be used to process data in
75
* a piecemeal fashion. The BufferedBlockCipher outputs a block only when the
@@ -243,7 +241,7 @@ public int processBytes(
243241
len -= gapLen;
244242
}
245243

246-
if (in == out && Arrays.segmentsOverlap(inOff, len, outOff, length))
244+
if (in == out)
247245
{
248246
in = new byte[len];
249247
System.arraycopy(out, inOff, in, 0, len);

0 commit comments

Comments
 (0)