summaryrefslogtreecommitdiffstats
path: root/mailnews/mapi/mapiDll
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 23:38:54 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 23:38:54 -0500
commit1d5ec356b3d5ec98177a76eaf2d32e728fd1a742 (patch)
tree72b64fcf27ba114ee022ec02e436827e9d7c85c7 /mailnews/mapi/mapiDll
parent22973db5032189f97bf8ad190981d71c890bf151 (diff)
downloadUXP-1d5ec356b3d5ec98177a76eaf2d32e728fd1a742.tar
UXP-1d5ec356b3d5ec98177a76eaf2d32e728fd1a742.tar.gz
UXP-1d5ec356b3d5ec98177a76eaf2d32e728fd1a742.tar.lz
UXP-1d5ec356b3d5ec98177a76eaf2d32e728fd1a742.tar.xz
UXP-1d5ec356b3d5ec98177a76eaf2d32e728fd1a742.zip
Bug 393302 - Correct memory handling in MAPISendMail() and CMapiImp::SendMail() to fix "Send to > Mail Recipient" crash.
Tag #1273
Diffstat (limited to 'mailnews/mapi/mapiDll')
-rw-r--r--mailnews/mapi/mapiDll/MapiDll.cpp35
1 files changed, 1 insertions, 34 deletions
diff --git a/mailnews/mapi/mapiDll/MapiDll.cpp b/mailnews/mapi/mapiDll/MapiDll.cpp
index b6b6ddbf7..ee527df4a 100644
--- a/mailnews/mapi/mapiDll/MapiDll.cpp
+++ b/mailnews/mapi/mapiDll/MapiDll.cpp
@@ -209,40 +209,7 @@ ULONG FAR PASCAL MAPISendMail (LHANDLE lhSession, ULONG ulUIParam, nsMapiMessage
bTempSession = TRUE ;
}
- // we need to deal with null data passed in by MAPI clients, specially when MAPI_DIALOG is set.
- // The MS COM type lib code generated by MIDL for the MS COM interfaces checks for these parameters
- // to be non null, although null is a valid value for them here.
- nsMapiRecipDesc * lpRecips ;
- nsMapiFileDesc * lpFiles ;
-
- nsMapiMessage Message ;
- memset (&Message, 0, sizeof (nsMapiMessage) ) ;
- nsMapiRecipDesc Recipient ;
- memset (&Recipient, 0, sizeof (nsMapiRecipDesc) );
- nsMapiFileDesc Files ;
- memset (&Files, 0, sizeof (nsMapiFileDesc) ) ;
-
- if(!lpMessage)
- {
- lpMessage = &Message ;
- }
- if(!lpMessage->lpRecips)
- {
- lpRecips = &Recipient ;
- }
- else
- lpRecips = lpMessage->lpRecips ;
- if(!lpMessage->lpFiles)
- {
- lpFiles = &Files ;
- }
- else
- lpFiles = lpMessage->lpFiles ;
-
- hr = pNsMapi->SendMail (lhSession, lpMessage,
- (short) lpMessage->nRecipCount, lpRecips,
- (short) lpMessage->nFileCount, lpFiles,
- flFlags, ulReserved);
+ hr = pNsMapi->SendMail(lhSession, lpMessage, flFlags, ulReserved);
// we are seeing a problem when using Word, although we return success from the MAPI support
// MS COM interface in mozilla, we are getting this error here. This is a temporary hack !!