mapi32: initialize session pointer to zero in MAPILogonEx (2nd resend)
James Hawkins
truiken at gmail.com
Wed Oct 8 15:12:48 CDT 2008
On Wed, Oct 8, 2008 at 3:07 PM, Louis. Lenders
<xerox_xerox2000 at yahoo.co.uk> wrote:
>
>
>
> diff --git a/dlls/mapi32/mapi32_main.c b/dlls/mapi32/mapi32_main.c
> index 936d435..5aace9a 100644
> --- a/dlls/mapi32/mapi32_main.c
> +++ b/dlls/mapi32/mapi32_main.c
> @@ -109,6 +109,7 @@ HRESULT WINAPI MAPILogonEx(ULONG_PTR uiparam,
> LPWSTR profile,
> {
> FIXME("(0x%08lx %s %p 0x%08x %p) Stub\n", uiparam,
> debugstr_w(profile), password, flags, session);
> + *session=0;
> return SUCCESS_SUCCESS;
> }
>
>>Are you guaranteed that session is not NULL?
>
> No, no garantueed, but i looked up some code-samples by google, and as far
> as i can tell, the current stub for MAPILogonEx will pass back garbage
> anyway to the application, so my thought was this patch would be rather
> harmless anyway.
>
The current stub doesn't pass back anything to the caller, and it
certainly doesn't crash. Your change will crash an app that passes a
NULL session pointer to the function.
--
James Hawkins
More information about the wine-devel
mailing list