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

This commit is contained in:
Will Tipton 2008-08-11 10:23:45 -04:00 committed by Alexandre Julliard
parent 497377ec39
commit accb5f8faf

View file

@ -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;