Alexandre Julliard : user32/tests: Fix access to an uninitialized variable.

Alexandre Julliard julliard at winehq.org
Fri Nov 9 07:44:28 CST 2007


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Nov  9 13:14:37 2007 +0100

user32/tests: Fix access to an uninitialized variable.

---

 dlls/user32/tests/dde.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c
index 5c01181..044e003 100644
--- a/dlls/user32/tests/dde.c
+++ b/dlls/user32/tests/dde.c
@@ -254,6 +254,7 @@ static HDDEDATA CALLBACK client_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon
 static void test_ddeml_client(void)
 {
     UINT ret;
+    char buffer[32];
     LPSTR str;
     DWORD size, res;
     HDDEDATA hdata, op;
@@ -359,8 +360,8 @@ static void test_ddeml_client(void)
 
     item = DdeCreateStringHandleA(client_pid, "poker", CP_WINANSI);
 
-    lstrcpyA(str, "poke data\r\n");
-    hdata = DdeCreateDataHandle(client_pid, (LPBYTE)str, lstrlenA(str) + 1,
+    lstrcpyA(buffer, "poke data\r\n");
+    hdata = DdeCreateDataHandle(client_pid, (LPBYTE)buffer, lstrlenA(buffer) + 1,
                                 0, item, CF_TEXT, 0);
     ok(hdata != NULL, "Expected non-NULL hdata\n");
 
@@ -402,8 +403,8 @@ static void test_ddeml_client(void)
 
     DdeFreeDataHandle(hdata);
 
-    lstrcpyA(str, "[Command(Var)]");
-    hdata = DdeCreateDataHandle(client_pid, (LPBYTE)str, lstrlenA(str) + 1,
+    lstrcpyA(buffer, "[Command(Var)]");
+    hdata = DdeCreateDataHandle(client_pid, (LPBYTE)buffer, lstrlenA(buffer) + 1,
                                 0, NULL, CF_TEXT, 0);
     ok(hdata != NULL, "Expected non-NULL hdata\n");
 




More information about the wine-cvs mailing list