fixed a buffer overread (OSS-Fuzz)
authorMarcus Meissner <marcus@jet.franken.de>
Sat, 15 Jun 2019 16:40:48 +0000 (18:40 +0200)
committerMarcus Meissner <marcus@jet.franken.de>
Sat, 15 Jun 2019 16:40:48 +0000 (18:40 +0200)
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8884

libexif/olympus/exif-mnote-data-olympus.c

index dac7f5b..669e4ec 100644 (file)
@@ -344,7 +344,7 @@ exif_mnote_data_olympus_load (ExifMnoteData *en,
 
        case nikonV2:
                o2 += 6;
-               if (o2 >= buf_size) return;
+               if (o2 + 8 >= buf_size) return;
                exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataOlympus",
                        "Parsing Nikon maker note v2 (0x%02x, %02x, %02x, "
                        "%02x, %02x, %02x, %02x, %02x)...",