[05/10] windowscodecs: Add a NULL check to GetFrameCount of the JPEG decoder.

Dmitry Timoshkov dmitry at baikal.ru
Thu Nov 22 21:49:09 CST 2012


---
 dlls/windowscodecs/jpegformat.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c
index 2c77d4f..8f20dfb 100644
--- a/dlls/windowscodecs/jpegformat.c
+++ b/dlls/windowscodecs/jpegformat.c
@@ -430,6 +430,8 @@ static HRESULT WINAPI JpegDecoder_GetThumbnail(IWICBitmapDecoder *iface,
 static HRESULT WINAPI JpegDecoder_GetFrameCount(IWICBitmapDecoder *iface,
     UINT *pCount)
 {
+    if (!pCount) return E_INVALIDARG;
+
     *pCount = 1;
     return S_OK;
 }
-- 
1.7.12.4




More information about the wine-patches mailing list