Skip to content

Commit

Permalink
Fix the P11Cipher AES/ECB/PKCS5Padding array index out of range issue
Browse files Browse the repository at this point in the history
Signed-off-by: Tao Liu <[email protected]>
  • Loading branch information
taoliult committed Sep 13, 2022
1 parent 6b49cb4 commit a0c6a1f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ private int implUpdate(byte[] in, int inOfs, int inLen,
if (padBufferLen != 0) {
if (padBufferLen != padBuffer.length) {
int bufCapacity = padBuffer.length - padBufferLen;
if (inLen > bufCapacity) {
if (inLen >= bufCapacity) {
bufferInputBytes(in, inOfs, bufCapacity);
inOfs += bufCapacity;
inLen -= bufCapacity;
Expand Down

0 comments on commit a0c6a1f

Please sign in to comment.