Marcus Meissner : oleaut32: Incorrect sizeof() to MultiByteToWideChar ( Coverity).

Alexandre Julliard julliard at winehq.org
Mon Feb 10 13:06:55 CST 2014


Module: wine
Branch: master
Commit: 5690127b2e9bad351c674b63381236725e91f5a2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5690127b2e9bad351c674b63381236725e91f5a2

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sat Feb  8 08:23:03 2014 +0100

oleaut32: Incorrect sizeof() to MultiByteToWideChar (Coverity).

---

 dlls/oleaut32/tests/typelib.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c
index 84b9023..73ec679 100644
--- a/dlls/oleaut32/tests/typelib.c
+++ b/dlls/oleaut32/tests/typelib.c
@@ -3982,12 +3982,12 @@ static void test_dump_typelib(const char *name)
         /* compare type uuid */
         if (ti->uuid && *ti->uuid)
         {
-            WCHAR guidW[39] = {0};
+            WCHAR guidW[39];
             ITypeInfo *typeinfo2;
             HRESULT hr;
             GUID guid;
 
-            MultiByteToWideChar(CP_ACP, 0, ti->uuid, -1, guidW, 40);
+            MultiByteToWideChar(CP_ACP, 0, ti->uuid, -1, guidW, sizeof(guidW)/sizeof(guidW[0]));
             IIDFromString(guidW, &guid);
             expect_guid(&guid, &typeattr->guid);
 




More information about the wine-cvs mailing list