[PATCH] propsys: propvariantclear does not clear on uninitialized values (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sat Sep 15 12:06:48 CDT 2012
Hi,
PropVariantClear() derefs propvar.vt... it must be initialized.
test this fact too.
Ciao, Marcus
---
dlls/propsys/tests/propsys.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c
index a18d6b1..df4b8d7 100644
--- a/dlls/propsys/tests/propsys.c
+++ b/dlls/propsys/tests/propsys.c
@@ -774,6 +774,11 @@ static void test_intconversions(void)
ULONGLONG ullval;
HRESULT hr;
+ propvar.vt = 0xdead;
+ hr = PropVariantClear(&propvar);
+ ok (FAILED(hr), "PropVariantClear fails on invalid vt.\n");
+
+ propvar.vt = VT_I8;
PropVariantClear(&propvar);
propvar.vt = VT_I8;
--
1.7.3.4
More information about the wine-patches
mailing list