diff --git a/ChangeLog b/ChangeLog index c217d186..365ed7bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-05-23 Frank Warmerdam + * libtiff/tif_ojpeg.c: make things more resilient in the face of files without + stripbytecounts or stripoffsets or where loading these fails. + * libtiff/tif_print.c: be careful about whether min/max values are singular or one per sample. diff --git a/libtiff/tif_ojpeg.c b/libtiff/tif_ojpeg.c index 0c9301d9..105100bc 100644 --- a/libtiff/tif_ojpeg.c +++ b/libtiff/tif_ojpeg.c @@ -1,4 +1,4 @@ -/* $Id: tif_ojpeg.c,v 1.54 2011-05-31 17:05:07 bfriesen Exp $ */ +/* $Id: tif_ojpeg.c,v 1.55 2012-05-24 02:43:51 fwarmerdam Exp $ */ /* WARNING: The type of JPEG encapsulation defined by the TIFF Version 6.0 specification is now totally obsolete and deprecated for new applications and @@ -1954,6 +1954,11 @@ OJPEGReadBufferFill(OJPEGState* sp) case osibsJpegInterchangeFormat: sp->in_buffer_source=osibsStrile; case osibsStrile: + if (!_TIFFFillStriles( sp->tif ) + || sp->tif->tif_dir.td_stripoffset == NULL + || sp->tif->tif_dir.td_stripbytecount == NULL) + return 0; + if (sp->in_buffer_next_strile==sp->in_buffer_strile_count) sp->in_buffer_source=osibsEof; else