diff --git a/ChangeLog b/ChangeLog index f85d3eaf..4586670e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-11-20 Even Rouault + * libtiff/tif_jpeg.c: fix segfault in JPEGFixupTagsSubsampling() on + corrupted image where tif->tif_dir.td_stripoffset == NULL (bug #2471) + 2014-11-20 Even Rouault * automake: updated to 1.14.1 * libtool: updated to 2.4.3 diff --git a/libtiff/tif_jpeg.c b/libtiff/tif_jpeg.c index b61b91b0..80aa2712 100644 --- a/libtiff/tif_jpeg.c +++ b/libtiff/tif_jpeg.c @@ -1,4 +1,4 @@ -/* $Id: tif_jpeg.c,v 1.111 2012-07-06 18:48:04 bfriesen Exp $ */ +/* $Id: tif_jpeg.c,v 1.112 2014-11-20 14:34:51 erouault Exp $ */ /* * Copyright (c) 1994-1997 Sam Leffler @@ -729,6 +729,7 @@ JPEGFixupTagsSubsampling(TIFF* tif) _TIFFFillStriles( tif ); if( tif->tif_dir.td_stripbytecount == NULL + || tif->tif_dir.td_stripoffset == NULL || tif->tif_dir.td_stripbytecount[0] == 0 ) { /* Do not even try to check if the first strip/tile does not