user32: Don't read past the end of a global memory block.

This commit is contained in:
Huw Davies 2008-07-17 15:10:28 +01:00 committed by Alexandre Julliard
parent b3f4091b47
commit bf89330d14
1 changed files with 4 additions and 2 deletions

View File

@ -178,8 +178,10 @@ static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA
ok(poke->cfFormat == CF_TEXT, "Expected CF_TEXT, got %d\n", poke->cfFormat);
if (msg_index == 5)
ok(lstrcmpA((LPSTR)poke->Value, "poke data\r\n"),
"Expected 'poke data\\r\\n', got %s\n", poke->Value);
{
size = GlobalSize((HGLOBAL)lo);
ok(size == 4, "got %d\n", size);
}
else
ok(!lstrcmpA((LPSTR)poke->Value, "poke data\r\n"),
"Expected 'poke data\\r\\n', got %s\n", poke->Value);