[PATCH] imm32: Fixed crashing in ImmGetIMCCSize.

Nikolay Sivov bunglehead at gmail.com
Tue Jul 9 08:01:46 CDT 2013


On 7/9/2013 16:50, Qian Hong wrote:
> Fixed a crash in MS Office 2010 Chinese version.
> Thanks Jiang Yike for the helps on testing :)
>
> ---
>  dlls/imm32/imm.c         |    6 ++++++
>  dlls/imm32/tests/imm32.c |   13 +++++++++++++
>  2 files changed, 19 insertions(+)
>
>
>
>
> +    if (IsBadReadPtr(internal, sizeof(HIMCC)))
> +    {
> +        SetLastError(ERROR_INVALID_HANDLE);
> +        return 0;
> +    }
> +

Do you really need this for Office 2010 or null check is enough? If it's passing 0 handle here
that's what you should check imho. If HIMCC is really a handle and not a struct pointer like in wine,
that's not how a handle validity check will look like.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130709/6b78718d/attachment.html>


More information about the wine-devel mailing list