[PATCH] ole32: Add parameter check for clipbrd_wndproc
Huw Davies
huw at codeweavers.com
Fri Apr 3 04:53:06 CDT 2020
On Fri, Mar 27, 2020 at 01:26:06PM +0800, Zhipeng Zhao wrote:
> When I use wechat-work to do some clip, there raise a exception.
>
> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48826
> Signed-off-by: Zhipeng Zhao <near2see at 163.com>
> ---
> dlls/ole32/clipboard.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
> index 9df37750a3..69a8fc61b2 100644
> --- a/dlls/ole32/clipboard.c
> +++ b/dlls/ole32/clipboard.c
> @@ -2066,6 +2066,11 @@ static LRESULT CALLBACK clipbrd_wndproc(HWND hwnd, UINT message, WPARAM wparam,
> ole_priv_data_entry *entry;
>
> TRACE("(): WM_RENDERFORMAT(cfFormat=%x)\n", cf);
> + if (!clipbrd || !clipbrd->cached_enum)
> + {
> + entry = NULL;
> + break;
> + }
> entry = find_format_in_list(clipbrd->cached_enum->entries, clipbrd->cached_enum->count, cf);
>
> if(entry)
Could you debug this a bit further? Is clipbrd or
clipbrd->cached_enum NULL? How does it get to this
state?
Thanks,
Huw.
More information about the wine-devel
mailing list