summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/exif/ExifOutputStream.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/exif/ExifOutputStream.java b/src/com/android/camera/exif/ExifOutputStream.java
index 90d4327..47b95d8 100644
--- a/src/com/android/camera/exif/ExifOutputStream.java
+++ b/src/com/android/camera/exif/ExifOutputStream.java
@@ -491,7 +491,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 {