diff options
author | Earl Ou <shunhsingou@google.com> | 2012-10-19 18:30:01 +0800 |
---|---|---|
committer | Earl Ou <shunhsingou@google.com> | 2012-10-31 14:49:04 +0800 |
commit | e761c182a1a0321df95f2c11aa97e4cd1377a880 (patch) | |
tree | 022980b99be65a415de94ac64946b410c9392cd5 /gallerycommon/src/com/android/gallery3d/exif/ExifTag.java | |
parent | abb1b01a32a400433ab60358d92ebea78a64b669 (diff) | |
download | android_packages_apps_Gallery2-e761c182a1a0321df95f2c11aa97e4cd1377a880.tar.gz android_packages_apps_Gallery2-e761c182a1a0321df95f2c11aa97e4cd1377a880.tar.bz2 android_packages_apps_Gallery2-e761c182a1a0321df95f2c11aa97e4cd1377a880.zip |
Handle invalid data type in ExifParser
Change-Id: I547021c03ec9e5d53c7452926c2ca5b6bf11dc43
Diffstat (limited to 'gallerycommon/src/com/android/gallery3d/exif/ExifTag.java')
-rw-r--r-- | gallerycommon/src/com/android/gallery3d/exif/ExifTag.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/exif/ExifTag.java b/gallerycommon/src/com/android/gallery3d/exif/ExifTag.java index 37b6d9fd0..157a8db3b 100644 --- a/gallerycommon/src/com/android/gallery3d/exif/ExifTag.java +++ b/gallerycommon/src/com/android/gallery3d/exif/ExifTag.java @@ -913,6 +913,13 @@ public class ExifTag { IfdId.TYPE_IFD_INTEROPERABILITY); } + static boolean isValidType(short type) { + return type == TYPE_UNSIGNED_BYTE || type == TYPE_ASCII || + type == TYPE_UNSIGNED_SHORT || type == TYPE_UNSIGNED_LONG || + type == TYPE_UNSIGNED_RATIONAL || type == TYPE_UNDEFINED || + type == TYPE_LONG || type == TYPE_RATIONAL; + } + ExifTag(short tagId, short type, int componentCount, int ifd) { mTagId = tagId; mDataType = type; |