summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2016-06-10 22:05:01 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-06-10 22:05:01 +0000
commit9c6e507bb38e1cede54c392058fd6ba42f0ef0a7 (patch)
tree0ae81ff5f3a5e4ec86a86a72694409520823640d
parentfa25efff717631d9728d482e4d4a504ab07f39b6 (diff)
parenta0628a05191a81f88f83077f0c1616aa91f5c0f8 (diff)
downloadjhead-master.tar.gz
am: a0628a0519 Change-Id: Ib5d873506e2d728ce6b86eea402dca5b856deed3
-rw-r--r--exif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/exif.c b/exif.c
index 561852b..6d8b96d 100644
--- a/exif.c
+++ b/exif.c
@@ -658,7 +658,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;