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

Commit 7bf0f568 authored by Ruben Brunk's avatar Ruben Brunk Committed by Android (Google) Code Review
Browse files

Merge "Cleanup sloppy memory handling in ExifOutputStream." into gb-ub-photos-bryce

parents 54762e1e 14954a62
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ class ExifOutputStream extends FilterOutputStream {
    private int mState = STATE_SOI;
    private int mByteToSkip;
    private int mByteToCopy;
    private byte[] mSingleByteArray = new byte[1];
    private ByteBuffer mBuffer = ByteBuffer.allocate(4);
    private final ExifInterface mInterface;

@@ -190,10 +191,8 @@ class ExifOutputStream extends FilterOutputStream {
     */
    @Override
    public void write(int oneByte) throws IOException {
        byte[] buf = new byte[] {
            (byte) (0xff & oneByte)
        };
        write(buf);
        mSingleByteArray[0] = (byte) (0xff & oneByte);
        write(mSingleByteArray);
    }

    /**