Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a533ef35 authored by Shawn Willden's avatar Shawn Willden Committed by android-build-merger
Browse files

Merge "Fix encryption/decryption of large blocks." into qt-dev

am: 3074669a

Change-Id: I559b919639d19ae7cb1fdbaf8effc95b6c7c1db3
parents 6a0b5f15 3074669a
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -162,16 +162,16 @@ class KeyStoreCryptoOperationChunkedStreamer implements KeyStoreCryptoOperationS
            }
            }


            if ((opResult.output != null) && (opResult.output.length > 0)) {
            if ((opResult.output != null) && (opResult.output.length > 0)) {
                if (inputLength > 0) {
                if (inputLength + mBufferedLength > 0) {
                    // More output might be produced in this loop -- buffer the current output
                    // More output might be produced in this loop -- buffer the current output
                    if (bufferedOutput == null) {
                    if (bufferedOutput == null) {
                        bufferedOutput = new ByteArrayOutputStream();
                        bufferedOutput = new ByteArrayOutputStream();
                    }
                    try {
                    try {
                        bufferedOutput.write(opResult.output);
                        bufferedOutput.write(opResult.output);
                    } catch (IOException e) {
                    } catch (IOException e) {
                        throw new ProviderException("Failed to buffer output", e);
                        throw new ProviderException("Failed to buffer output", e);
                    }
                    }
                    }
                } else {
                } else {
                    // No more output will be produced in this loop
                    // No more output will be produced in this loop
                    byte[] result;
                    byte[] result;