diff options
author | Marco Nelissen <marcone@google.com> | 2016-06-09 14:07:50 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2016-06-09 21:09:13 +0000 |
commit | 751b4eba25aa2e2a31232c9c25ceb6dbddfb1d93 (patch) | |
tree | 6dd0e64c7a364aa4232838e813dab0e4885ad8d5 | |
parent | acbfc9c1c7e1a84b0db4dc5bc3d5346b6c55c473 (diff) | |
download | jhead-751b4eba25aa2e2a31232c9c25ceb6dbddfb1d93.tar.gz |
Fix possible out of bounds access
Bug: 28868315
Change-Id: I2b416c662f9ad7f9b3c6cf973a39c6693c66775a
-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; |