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

Commit 6999ef34 authored by Lajos Molnar's avatar Lajos Molnar Committed by android-build-merger
Browse files

camera2: limit flexYUV array size in DngCreator

automerge: fdb2112b

* commit 'fdb2112b':
  camera2: limit flexYUV array size in DngCreator
parents f1b78d04 fdb2112b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -530,9 +530,9 @@ public final class DngCreator implements AutoCloseable {
        int uPixStride = uPlane.getPixelStride();

        byte[] yuvPixel = { 0, 0, 0 };
        byte[] yFullRow = new byte[yPixStride * width];
        byte[] uFullRow = new byte[uPixStride * width / 2];
        byte[] vFullRow = new byte[vPixStride * width / 2];
        byte[] yFullRow = new byte[yPixStride * (width - 1) + 1];
        byte[] uFullRow = new byte[uPixStride * (width / 2 - 1) + 1];
        byte[] vFullRow = new byte[vPixStride * (width / 2 - 1) + 1];
        byte[] finalRow = new byte[BYTES_PER_RGB_PIX * width];
        for (int i = 0; i < height; i++) {
            int halfH = i / 2;