[PATCH 3/3] Check for edit window to be here in case of destruction during handler execution.
Nikolay Sivov
bunglehead at gmail.com
Wed Dec 2 14:22:12 CST 2009
A problem shows up for example if we destroy window after WM_COMMAND notification,
returning from WM_COMMAND sending call edit contents will be lost already and
trying to unlock buffer will lead to reading freed memory at least.
---
dlls/user32/edit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index f4143b1..b512aa4 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -5390,7 +5390,7 @@ static LRESULT EditWndProc_common( HWND hwnd, UINT msg,
break;
}
- if (es) EDIT_UnlockBuffer(es, FALSE);
+ if (IsWindow(hwnd) && es) EDIT_UnlockBuffer(es, FALSE);
TRACE("hwnd=%p msg=%x (%s) -- 0x%08lx\n", hwnd, msg, SPY_GetMsgName(msg, hwnd), result);
--
1.5.6.5
--=-MVp24Wdn7Bl5Doz/pOXt--
More information about the wine-patches
mailing list