Will Tipton : comctl32: Added input validation to TOOLTIPS_GetTextW() in order to handle gracefully the case where it is called with an empty tooltip .

Alexandre Julliard julliard at winehq.org
Mon Aug 18 10:46:45 CDT 2008


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

Author: Will Tipton <wtipton at MIT.EDU>
Date:   Mon Aug 11 10:23:45 2008 -0400

comctl32: Added input validation to TOOLTIPS_GetTextW() in order to handle gracefully the case where it is called with an empty tooltip.

---

 dlls/comctl32/tooltips.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index f7e538b..1149a07 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -1574,6 +1574,9 @@ TOOLTIPS_GetTextW (HWND hwnd, WPARAM wParam, LPARAM lParam)
     nTool = TOOLTIPS_GetToolFromInfoW (infoPtr, lpToolInfo);
     if (nTool == -1) return 0;
 
+    if (infoPtr->tools[nTool].lpszText == NULL)
+	return 0;
+
     strcpyW (lpToolInfo->lpszText, infoPtr->tools[nTool].lpszText);
 
     return 0;




More information about the wine-cvs mailing list