[PATCH] user32: check GetClipboardFormatName length
Marcus Meissner
marcus at jet.franken.de
Sun Nov 5 15:58:51 CST 2017
Signed-off-by: Marcus Meissner <marcus at jet.franken.de>
---
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
More information about the wine-patches
mailing list