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

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


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

diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c
index 6d6117e..c3e03c1 100644
--- a/dlls/windowscodecs/pngformat.c
+++ b/dlls/windowscodecs/pngformat.c
@@ -640,6 +640,8 @@ static HRESULT WINAPI PngDecoder_GetThumbnail(IWICBitmapDecoder *iface,
 static HRESULT WINAPI PngDecoder_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