[PATCH] winex11.drv: handle src access without src paramters (Coverity)

Marcus Meissner marcus at jet.franken.de
Sat Jan 31 16:00:08 CST 2009


Hi,

CID 203, Coverity thinks this can be entered with useSrc 0 and physDev NULL.
Check for it and return FAIL...

Ciao, Marcus
---
 dlls/winex11.drv/bitblt.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c
index 259c1bb..e2005a5 100644
--- a/dlls/winex11.drv/bitblt.c
+++ b/dlls/winex11.drv/bitblt.c
@@ -1384,6 +1384,10 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
         }
         else if (OP_SRCDST(*opcode) == OP_ARGS(SRC,DST))
         {
+            if (!useSrc || !physDevSrc) {
+                FIXME("Opcode has src inside, but useSrc or physDevSrc are 0\n");
+                return FALSE;
+            }
             if (physDevSrc->depth == physDevDst->depth)
             {
                 wine_tsx11_lock();
-- 
1.5.6



More information about the wine-patches mailing list