user32: handle GetMenuItemCount returning -1 (coverity 229)

Alexandre Julliard julliard at winehq.org
Tue Nov 4 04:03:09 CST 2008


Aric Stewart <aric at codeweavers.com> writes:

> diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c
> index fe70b80..1404436 100644
> --- a/dlls/user32/mdi.c
> +++ b/dlls/user32/mdi.c
> @@ -393,7 +393,8 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
>   */
>  static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci)
>  {
> -    UINT i, count, visible, id;
> +    UINT i, visible, id;
> +    INT count;

This shouldn't happen since the menu has just been validated. And if you
really want to handle that case you have to treat it as an error, not
just ignore it.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list