diff options
author | Marco Nelissen <marcone@google.com> | 2016-06-10 21:42:35 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-06-10 21:42:35 +0000 |
commit | 854fedfa6b1cae1f37fe407f407ba833954b8fba (patch) | |
tree | 02cce0896b530595982270ec0dfc3163c65a7321 | |
parent | afe9f55ee6ba3eaee02e7b13809a534ebe98d34a (diff) | |
parent | dbefc1dc4a7ea50d7a09f7799fe4aa20ca227433 (diff) | |
download | jhead-854fedfa6b1cae1f37fe407f407ba833954b8fba.tar.gz |
Fix possible out of bounds access am: 751b4eba25 am: b201f04d8c am: 2d49e2de6e am: a3c15ad42d am: 6c2d0e45b5
am: dbefc1dc4a
Change-Id: Iad8b05c5343f63c30c035b2f8e6f611a6056fb88
-rw-r--r-- | exif.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -614,7 +614,7 @@ static void ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned OffsetVal; OffsetVal = Get32u(DirEntry+8); // If its bigger than 4 bytes, the dir entry contains an offset. - if (OffsetVal+ByteCount > ExifLength){ + if (OffsetVal > UINT32_MAX - ByteCount || OffsetVal+ByteCount > ExifLength){ // Bogus pointer offset and / or bytecount value ErrNonfatal("Illegal value pointer for tag %04x", Tag,0); continue; |