[PATCH] user32: fixed sizeof() to MultiByteToWideChar
Marcus Meissner
marcus at jet.franken.de
Tue Nov 5 14:54:27 CST 2013
found by my overflow checker
---
dlls/user32/tests/class.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c
index c8d6a26..1d35832 100644
--- a/dlls/user32/tests/class.c
+++ b/dlls/user32/tests/class.c
@@ -1041,7 +1041,7 @@ static void test_comctl32_class( const char *name )
ret = GetClassInfoA( 0, name, &wcA );
ok( ret || broken(!ret) /* <= winxp */, "GetClassInfoA failed for %s\n", name );
if (!ret) return;
- MultiByteToWideChar( CP_ACP, 0, name, -1, nameW, sizeof(nameW) );
+ MultiByteToWideChar( CP_ACP, 0, name, -1, nameW, sizeof(nameW)/sizeof(WCHAR) );
ret = GetClassInfoW( 0, nameW, &wcW );
ok( ret, "GetClassInfoW failed for %s\n", name );
module = GetModuleHandleA( "comctl32" );
--
1.7.10.4
More information about the wine-patches
mailing list