safer directory set in tiff load
This commit is contained in:
parent
0f57f3692b
commit
6e1fd6136d
|
@ -679,7 +679,9 @@ rtiff_n_pages( Rtiff *rtiff )
|
||||||
for( n = 1; TIFFReadDirectory( rtiff->tiff ); n++ )
|
for( n = 1; TIFFReadDirectory( rtiff->tiff ); n++ )
|
||||||
;
|
;
|
||||||
|
|
||||||
rtiff->current_page = n - 1;
|
/* Make sure the nest set_page() will set the directory.
|
||||||
|
*/
|
||||||
|
rtiff->current_page = -1;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf( "rtiff_n_pages: found %d pages\n", n );
|
printf( "rtiff_n_pages: found %d pages\n", n );
|
||||||
|
|
Loading…
Reference in New Issue