tiff/tiff-3.9.2-NULL-deref.patch
Petr Gajdos 534e709f59 - fixed CVE-2010-2065
* integer-overflow.patch
  * NULL-deref.patch
  and out of bounds read
  * oob-read.patch

OBS-URL: https://build.opensuse.org/package/show/graphics/tiff?expand=0&rev=17
2010-06-23 08:48:20 +00:00

20 lines
783 B
Diff

Index: libtiff/tif_ojpeg.c
===================================================================
RCS file: /cvs/maptools/cvsroot/libtiff/libtiff/tif_ojpeg.c,v
retrieving revision 1.24.2.5
retrieving revision 1.24.2.6
diff -u -p -r1.24.2.5 -r1.24.2.6
--- libtiff/tif_ojpeg.c 8 Jun 2010 18:50:42 -0000 1.24.2.5
+++ libtiff/tif_ojpeg.c 8 Jun 2010 23:29:51 -0000 1.24.2.6
@@ -1909,6 +1909,10 @@ OJPEGReadBufferFill(OJPEGState* sp)
sp->in_buffer_source=osibsEof;
else
{
+ if (sp->tif->tif_dir.td_stripoffset == 0) {
+ TIFFErrorExt(sp->tif->tif_clientdata,sp->tif->tif_name,"Strip offsets are missing");
+ return(0);
+ }
sp->in_buffer_file_pos=sp->tif->tif_dir.td_stripoffset[sp->in_buffer_next_strile];
if (sp->in_buffer_file_pos!=0)
{