Lei Zhang : mapi32: Fix UrlEscapeA usage in MAPISendMail.
Alexandre Julliard
julliard at winehq.org
Thu Jan 10 06:42:02 CST 2008
Module: wine
Branch: master
Commit: 992c891c8fc9b8dbb2abe706204e2d6e058def44
URL: http://source.winehq.org/git/wine.git/?a=commit;h=992c891c8fc9b8dbb2abe706204e2d6e058def44
Author: Lei Zhang <thestig at google.com>
Date: Wed Jan 9 14:05:29 2008 -0800
mapi32: Fix UrlEscapeA usage in MAPISendMail.
---
dlls/mapi32/sendmail.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/mapi32/sendmail.c b/dlls/mapi32/sendmail.c
index 6968f7d..4103117 100644
--- a/dlls/mapi32/sendmail.c
+++ b/dlls/mapi32/sendmail.c
@@ -67,6 +67,7 @@ ULONG WINAPI MAPISendMail( LHANDLE session, ULONG_PTR uiparam,
static const char format[] =
"mailto:\"%s\"?subject=\"%s\"&cc=\"%s\"&bcc=\"%s\"&body=\"%s\"";
char *mailto = NULL, *escape = NULL;
+ char empty_string[] = "";
HRESULT res;
DWORD size;
@@ -178,8 +179,8 @@ ULONG WINAPI MAPISendMail( LHANDLE session, ULONG_PTR uiparam,
sprintf( mailto, format, to ? to : "", subject, cc ? cc : "", bcc ? bcc : "", body );
- size = 0;
- res = UrlEscapeA( mailto, NULL, &size, URL_ESCAPE_SPACES_ONLY );
+ size = 1;
+ res = UrlEscapeA( mailto, empty_string, &size, URL_ESCAPE_SPACES_ONLY );
if (res != E_POINTER) goto exit;
escape = HeapAlloc( GetProcessHeap(), 0, size );
More information about the wine-cvs
mailing list