[WIN32K:NTUSER]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 11 Jun 2017 06:05:42 +0000 (06:05 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 11 Jun 2017 06:05:42 +0000 (06:05 +0000)
- Include the CLIPBOARDDATA structure itself when calculating the size passed to UserCreateObject in IntSynthesizeDib. Fixes user heap corruption when running user32_winetest:clipboard.
CORE-13408

svn path=/trunk/; revision=74990

reactos/win32ss/user/ntuser/clipboard.c

index b9ba6f9..e6809f4 100644 (file)
@@ -180,7 +180,7 @@ IntSynthesizeDib(
                                                       NULL,
                                                       &hMem,
                                                       TYPE_CLIPDATA,
-                                                      cjDataSize);
+                                                      sizeof(CLIPBOARDDATA) + cjDataSize);
     if (!pClipboardData)
     {
         goto cleanup;