[PATCH] oleaut32: initialize scaled (Coverity)

Marcus Meissner marcus at jet.franken.de
Sun Mar 1 08:17:40 CST 2015


1225850 Uninitialized scalar variable

Not an actual big issue, but Coverity sees the struct copy
where we also copy the "wReserved" member back and forth.

Better initialize the full value to 0.

Ciao, Marcus
---
 dlls/oleaut32/vartype.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c
index 607d1a2..ba2b9da 100644
--- a/dlls/oleaut32/vartype.c
+++ b/dlls/oleaut32/vartype.c
@@ -4592,6 +4592,7 @@ HRESULT WINAPI VarDecAdd(const DECIMAL* pDecLeft, const DECIMAL* pDecRight, DECI
   HRESULT hRet;
   DECIMAL scaled[2];
 
+  memset(scaled, 0, sizeof(scaled));
   hRet = VARIANT_DecScale(&pDecLeft, &pDecRight, scaled);
 
   if (SUCCEEDED(hRet))
-- 
1.8.4.5




More information about the wine-patches mailing list