[PATCH] shdocvw: Check safearray dimension too (Coverity)

Marcus Meissner marcus at jet.franken.de
Sat May 7 13:36:20 CDT 2011


Hi,

We pass in a single integer index, so check that the
safe arrays dimension is 1.

CID 4824

Ciao, Marcus
---
 dlls/shdocvw/dochost.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/shdocvw/dochost.c b/dlls/shdocvw/dochost.c
index 3c0dbd2..edbd3c2 100644
--- a/dlls/shdocvw/dochost.c
+++ b/dlls/shdocvw/dochost.c
@@ -479,7 +479,7 @@ static HRESULT WINAPI ClOleCommandTarget_Exec(IOleCommandTarget *iface,
             LONG ind;
             HRESULT hres;
 
-            if(V_VT(pvaIn) != VT_ARRAY || !sa)
+            if(V_VT(pvaIn) != VT_ARRAY || !sa || (SafeArrayGetDim(sa) != 1))
                 return E_INVALIDARG;
 
             ind = 0;
-- 
1.7.3.4



More information about the wine-patches mailing list