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

Commit 04d24364 authored by tobigun's avatar tobigun Committed by Gerrit Code Review
Browse files

Fix crash if Exif-Tag buffer-length and component-count are both 0

Change-Id: Iad9b60d135b4f682c08c3bfc9698cdd10e1086ab
parent adadaa8f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -482,7 +482,7 @@ class ExifOutputStream extends FilterOutputStream {
        switch (tag.getDataType()) {
            case ExifTag.TYPE_ASCII:
                byte buf[] = tag.getStringByte();
                if (buf.length == tag.getComponentCount()) {
                if (buf.length == tag.getComponentCount() && buf.length > 0) {
                    buf[buf.length - 1] = 0;
                    dataOutputStream.write(buf);
                } else {