Update of /cvsroot/libexif/libexif/libexif/pentax
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31085/libexif/pentax
Modified Files:
exif-mnote-data-pentax.c
Log Message:
2009-03-21 Lutz Mueller <lu...@us...>
Meder Kydyraliev <me...@gm...> suggested to add some sanity
checks:
* libexif/exif-data.c (exif_data_load_entry),
(exif_data_load_data_thumbnail)
* libexif/canon/exif_mnote-data-canon.c
(exif_mnote_data_canon_load)
* libexif/fuji/exif-mnote-data-fuji.c
(exif_mnote_data_fuji_load)
* libexif/olympus/exif-mnote-data-olympus.c
(exif_mnote_data_olympus_load)
* libexif/pentax/exif-mnote-data-pentax.c
(exif_mnote_data_pentax_load)
Index: exif-mnote-data-pentax.c
===================================================================
RCS file: /cvsroot/libexif/libexif/libexif/pentax/exif-mnote-data-pentax.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -d -r1.14 -r1.15
--- exif-mnote-data-pentax.c 14 Jan 2009 07:56:52 -0000 1.14
+++ exif-mnote-data-pentax.c 21 Mar 2009 22:03:09 -0000 1.15
@@ -139,10 +139,10 @@ exif_mnote_data_pentax_load (ExifMnoteDa
if (!s) return;
o += 8;
if (s > 4) o = exif_get_long (buf + o, n->order) + 6;
- if (o + s > buf_size) {
- exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifMnoteDataPentax",
- "Tag data past end of buffer (%u > %u)",
- o+s, buf_size);
+ if ((o + s < o) || (o + s < s) || (o + s > buf_size)) {
+ exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
+ "ExifMnoteDataPentax", "Tag data past end "
+ "of buffer (%u > %u)", o + s, buf_size);
return;
}
|