diff options
author | Marco Nelissen <marcone@google.com> | 2016-06-10 21:57:51 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-06-10 21:57:51 +0000 |
commit | 2a4c12f5e5808e309b9ba04fe8b1539debf466d1 (patch) | |
tree | e6c1fac71143a5b0cde5934c99649cf6d3528b8d | |
parent | 5c8f937269957e6651383e988006824781fd021a (diff) | |
parent | 3daffc0fbaba7f1732861652ca336d37a0824100 (diff) | |
download | jhead-2a4c12f5e5808e309b9ba04fe8b1539debf466d1.tar.gz |
Fix possible out of bounds access am: 751b4eba25 am: b201f04d8c am: 2d49e2de6e am: a3c15ad42d am: 6c2d0e45b5 am: dbefc1dc4a am: 854fedfa6b am: 2ea3783c81 am: e3574d919b
am: 3daffc0fba
Change-Id: Ia1b49f8df9939a2120bc3b661fecc025d1012aa1
-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; |