Commit 7cd20a41 authored by Owen Rudge's avatar Owen Rudge Committed by Alexandre Julliard

winemapi: Ensure address is valid before checking for 'smtp:'.

parent f1be598e
......@@ -87,11 +87,12 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam,
}
address = message->lpRecips[i].lpszAddress;
if (!strncasecmp(address, smtp, sizeof(smtp) - 1))
address += sizeof(smtp) - 1;
if (address)
{
if (!strncasecmp(address, smtp, sizeof(smtp) - 1))
address += sizeof(smtp) - 1;
switch (message->lpRecips[i].ulRecipClass)
{
case MAPI_ORIG:
......@@ -172,11 +173,12 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam,
for (i = 0; i < message->nRecipCount; i++)
{
address = message->lpRecips[i].lpszAddress;
if (!strncasecmp(address, smtp, sizeof(smtp) - 1))
address += sizeof(smtp) - 1;
if (address)
{
if (!strncasecmp(address, smtp, sizeof(smtp) - 1))
address += sizeof(smtp) - 1;
switch (message->lpRecips[i].ulRecipClass)
{
case MAPI_TO:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment