[v4 PATCH] comctl32/tooltip: Protect TTM_ADDTOOLW from invalid text pointers

Alexandre Julliard julliard at winehq.org
Mon Feb 29 06:57:43 CST 2016


Alistair Leslie-Hughes <leslie_alistair at hotmail.com> writes:

> @@ -1041,6 +1041,9 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
>      if (ti->cbSize >= TTTOOLINFOW_V2_SIZE && !ti->lpszText && isW)
>          return FALSE;
>  
> +    if(isW && ti->lpszText && IsBadReadPtr(ti->lpszText, sizeof(WCHAR)))
> +        return FALSE;

You want IsBadStringPtrW, and this should most likely be merged with the
check above it one way or another.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list