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

Commit 9f3868d3 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun
Browse files

ExifInterface: Add missing ifd format name "IFD"

There has been IFD_FORMAT_IFD = 13 but IFD_FORMAT_NAMES[13]
was not defined, which could throw ArrayIndexOutOfBoundsException.

By providing proper name, we can prevent the exception.

Test: atest exifinterfacetest
Change-Id: Ib11b83a55d54ad2fc6377bb5cc55f6c2fdbe231c
parent 3a5492c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -527,7 +527,7 @@ public class ExifInterface {
    // Names for the data formats for debugging purpose.
    private static final String[] IFD_FORMAT_NAMES = new String[] {
            "", "BYTE", "STRING", "USHORT", "ULONG", "URATIONAL", "SBYTE", "UNDEFINED", "SSHORT",
            "SLONG", "SRATIONAL", "SINGLE", "DOUBLE"
            "SLONG", "SRATIONAL", "SINGLE", "DOUBLE", "IFD"
    };
    // Sizes of the components of each IFD value format
    private static final int[] IFD_FORMAT_BYTES_PER_FORMAT = new int[] {