comctl32/treeview: Protect TVM_GETITEM from invalid item pointers

Alexandre Julliard julliard at winehq.org
Fri Feb 22 04:09:39 CST 2013


Nikolay Sivov <nsivov at codeweavers.com> writes:

> @@ -2101,9 +2102,17 @@ TREEVIEW_GetItemT(const TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem, BOOL isW)
>      {
>          if (!item) return FALSE;
>  
> -        TRACE("got item from different tree %p, called from %p\n", item->infoPtr, infoPtr);
> -        infoPtr = item->infoPtr;
> -        if (!TREEVIEW_ValidItem(infoPtr, item)) return FALSE;
> +        __TRY
> +        {
> +            infoPtr = item->infoPtr;
> +            TRACE("got item from different tree %p, called from %p\n", item->infoPtr, infoPtr);
> +            if (!TREEVIEW_ValidItem(infoPtr, item)) return FALSE;

You can't return from a try block.

Also have you verified that this is not just masking some other Wine
bug?

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list