Alexandre Julliard : user: Fixed offset check for the DWLP_DLGPROC case in SetWindowLong.

Alexandre Julliard julliard at wine.codeweavers.com
Tue May 9 14:15:24 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 5326e304d017669d2512ad69ab8a4057eb0ed118
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=5326e304d017669d2512ad69ab8a4057eb0ed118

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue May  9 13:50:53 2006 +0200

user: Fixed offset check for the DWLP_DLGPROC case in SetWindowLong.

---

 dlls/user/win.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/user/win.c b/dlls/user/win.c
index 9fef05b..2cacdb8 100644
--- a/dlls/user/win.c
+++ b/dlls/user/win.c
@@ -2006,7 +2006,7 @@ static LONG_PTR WIN_SetWindowLong( HWND 
     case GWLP_USERDATA:
         break;
     case DWLP_DLGPROC:
-        if ((wndPtr->cbWndExtra + sizeof(LONG_PTR) >= DWLP_DLGPROC) && (wndPtr->flags & WIN_ISDIALOG))
+        if ((wndPtr->cbWndExtra - sizeof(LONG_PTR) >= DWLP_DLGPROC) && (wndPtr->flags & WIN_ISDIALOG))
         {
             WNDPROC *ptr = (WNDPROC *)((char *)wndPtr->wExtra + DWLP_DLGPROC);
             retval = (ULONG_PTR)WINPROC_GetProc( *ptr, type );




More information about the wine-cvs mailing list