Commit 5fa4e85a authored by Alexandre Julliard's avatar Alexandre Julliard

user32/tests: Fix access to an uninitialized variable.

parent 57226607
...@@ -254,6 +254,7 @@ static HDDEDATA CALLBACK client_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon ...@@ -254,6 +254,7 @@ static HDDEDATA CALLBACK client_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon
static void test_ddeml_client(void) static void test_ddeml_client(void)
{ {
UINT ret; UINT ret;
char buffer[32];
LPSTR str; LPSTR str;
DWORD size, res; DWORD size, res;
HDDEDATA hdata, op; HDDEDATA hdata, op;
...@@ -359,8 +360,8 @@ static void test_ddeml_client(void) ...@@ -359,8 +360,8 @@ static void test_ddeml_client(void)
item = DdeCreateStringHandleA(client_pid, "poker", CP_WINANSI); item = DdeCreateStringHandleA(client_pid, "poker", CP_WINANSI);
lstrcpyA(str, "poke data\r\n"); lstrcpyA(buffer, "poke data\r\n");
hdata = DdeCreateDataHandle(client_pid, (LPBYTE)str, lstrlenA(str) + 1, hdata = DdeCreateDataHandle(client_pid, (LPBYTE)buffer, lstrlenA(buffer) + 1,
0, item, CF_TEXT, 0); 0, item, CF_TEXT, 0);
ok(hdata != NULL, "Expected non-NULL hdata\n"); ok(hdata != NULL, "Expected non-NULL hdata\n");
...@@ -402,8 +403,8 @@ static void test_ddeml_client(void) ...@@ -402,8 +403,8 @@ static void test_ddeml_client(void)
DdeFreeDataHandle(hdata); DdeFreeDataHandle(hdata);
lstrcpyA(str, "[Command(Var)]"); lstrcpyA(buffer, "[Command(Var)]");
hdata = DdeCreateDataHandle(client_pid, (LPBYTE)str, lstrlenA(str) + 1, hdata = DdeCreateDataHandle(client_pid, (LPBYTE)buffer, lstrlenA(buffer) + 1,
0, NULL, CF_TEXT, 0); 0, NULL, CF_TEXT, 0);
ok(hdata != NULL, "Expected non-NULL hdata\n"); ok(hdata != NULL, "Expected non-NULL hdata\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment