Aric Stewart : user32: In DrawTextW/ A make sure to properly initialize the cbSize of DRAWTEXTPARAMS.

Alexandre Julliard julliard at winehq.org
Tue Oct 14 08:30:18 CDT 2008


Module: wine
Branch: master
Commit: 8b9ebc30c90ba065b4d08c76feaaffdb9d6d818c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8b9ebc30c90ba065b4d08c76feaaffdb9d6d818c

Author: Aric Stewart <aric at codeweavers.com>
Date:   Mon Oct 13 08:30:55 2008 -0500

user32: In DrawTextW/A make sure to properly initialize the cbSize of DRAWTEXTPARAMS.

---

 dlls/user32/text.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/text.c b/dlls/user32/text.c
index da3444d..b28bd71 100644
--- a/dlls/user32/text.c
+++ b/dlls/user32/text.c
@@ -1081,6 +1081,7 @@ INT WINAPI DrawTextW( HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags )
     DRAWTEXTPARAMS dtp;
 
     memset (&dtp, 0, sizeof(dtp));
+    dtp.cbSize = sizeof(dtp);
     if (flags & DT_TABSTOP)
     {
         dtp.iTabLength = (flags >> 8) & 0xff;
@@ -1097,6 +1098,7 @@ INT WINAPI DrawTextA( HDC hdc, LPCSTR str, INT count, LPRECT rect, UINT flags )
     DRAWTEXTPARAMS dtp;
 
     memset (&dtp, 0, sizeof(dtp));
+    dtp.cbSize = sizeof(dtp);
     if (flags & DT_TABSTOP)
     {
         dtp.iTabLength = (flags >> 8) & 0xff;




More information about the wine-cvs mailing list