[PATCH] user32: check GetClipboardFormatName length
Marcus Meissner <[email protected]> Sun, 5 Nov 2017 22:58:51 +0100
| Newsgroups | gmane.comp.emulators.wine.patches |
|---|---|
| Message-ID | <[email protected]> |
Signed-off-by: Marcus Meissner <[email protected]> --- dlls/user32/tests/clipboard.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c index 8391ea06e3..aa3bd04852 100644 --- a/dlls/user32/tests/clipboard.c +++ b/dlls/user32/tests/clipboard.c @@ -385,6 +385,9 @@ static void test_RegisterClipboardFormatA(void) ok(len == lstrlenA("my_cool_clipboard_format"), "wrong format name length %d\n", len); ok(!lstrcmpA(buf, "my_cool_clipboard_format"), "wrong format name \"%s\"\n", buf); + len = GetClipboardFormatNameA(format_id, NULL, 0); + ok(len == 0, "wrong format name length %d\n", len); + lstrcpyA(buf, "foo"); SetLastError(0xdeadbeef); len = GetAtomNameA((ATOM)format_id, buf, 256); -- 2.14.3