Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/windowscodecs/tiffformat.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c index 58cd04ef17..3bc8d696ca 100644 --- a/dlls/windowscodecs/tiffformat.c +++ b/dlls/windowscodecs/tiffformat.c @@ -638,6 +638,7 @@ static HRESULT WINAPI TiffDecoder_Initialize(IWICBitmapDecoder *iface, IStream * { TiffDecoder *This = impl_from_IWICBitmapDecoder(iface); TIFF *tiff; + tiff_decode_info decode_info; HRESULT hr=S_OK;
TRACE("(%p,%p,%x)\n", iface, pIStream, cacheOptions); @@ -651,13 +652,20 @@ static HRESULT WINAPI TiffDecoder_Initialize(IWICBitmapDecoder *iface, IStream * }
tiff = tiff_open_stream(pIStream, "r"); - if (!tiff) { hr = E_FAIL; goto exit; }
+ /* make sure that TIFF format is supported */ + hr = tiff_get_decode_info(tiff, &decode_info); + if (hr != S_OK) + { + pTIFFClose(tiff); + goto exit; + } + This->tiff = tiff; This->stream = pIStream; IStream_AddRef(pIStream);