msvfw32: Avoid possible dereference of NULL pointer (Coverity)
Andrew Talbot
andrew.talbot at talbotville.com
Sat Feb 2 07:36:18 CST 2008
Fix for Coverity CID #262.
-- Andy.
---
Changelog:
msvfw32: Avoid possible dereference of NULL pointer (Coverity)
diff --git a/dlls/msvfw32/drawdib.c b/dlls/msvfw32/drawdib.c
index 3b30823..137716d 100644
--- a/dlls/msvfw32/drawdib.c
+++ b/dlls/msvfw32/drawdib.c
@@ -133,6 +133,8 @@ BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd)
TRACE("(%p)\n", hdd);
+ if (!whdd) return FALSE;
+
whdd->hpal = 0; /* Do not free this */
whdd->hdc = 0;
HeapFree(GetProcessHeap(), 0, whdd->lpbi);
More information about the wine-patches
mailing list