https://git.reactos.org/?p=reactos.git;a=commitdiff;h=33351fe5add268b3d8462d...
commit 33351fe5add268b3d8462d95fca5d85759793ff2 Author: Amine Khaldi amine.khaldi@reactos.org AuthorDate: Mon Oct 1 12:55:17 2018 +0100 Commit: Amine Khaldi amine.khaldi@reactos.org CommitDate: Mon Oct 1 12:55:17 2018 +0100
[INETCOMM] Sync with Wine Staging 3.17. CORE-15127 --- dll/win32/inetcomm/mimeole.c | 7 +++---- dll/win32/inetcomm/protocol.c | 18 +++++++++--------- media/doc/README.WINE | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/dll/win32/inetcomm/mimeole.c b/dll/win32/inetcomm/mimeole.c index b7d6d6ab3a..f13a4ff17a 100644 --- a/dll/win32/inetcomm/mimeole.c +++ b/dll/win32/inetcomm/mimeole.c @@ -1584,9 +1584,8 @@ static HRESULT decode_base64(IStream *input, IStream **ret_stream)
while(1) { /* skip invalid chars */ - while(ptr < end && - (*ptr >= sizeof(base64_decode_table)/sizeof(*base64_decode_table) - || base64_decode_table[*ptr] == -1)) + while(ptr < end && (*ptr >= ARRAY_SIZE(base64_decode_table) + || base64_decode_table[*ptr] == -1)) ptr++; if(ptr == end) break; @@ -3718,7 +3717,7 @@ HRESULT WINAPI MimeOleObjectFromMoniker(BINDF bindf, IMoniker *moniker, IBindCtx return E_OUTOFMEMORY;
memcpy(mhtml_url, mhtml_prefixW, sizeof(mhtml_prefixW)); - strcpyW(mhtml_url + sizeof(mhtml_prefixW)/sizeof(WCHAR), display_name); + strcpyW(mhtml_url + ARRAY_SIZE(mhtml_prefixW), display_name); HeapFree(GetProcessHeap(), 0, display_name);
hres = CreateURLMoniker(NULL, mhtml_url, moniker_new); diff --git a/dll/win32/inetcomm/protocol.c b/dll/win32/inetcomm/protocol.c index 028463a269..c6a59fee7c 100644 --- a/dll/win32/inetcomm/protocol.c +++ b/dll/win32/inetcomm/protocol.c @@ -83,16 +83,16 @@ static HRESULT parse_mhtml_url(const WCHAR *url, mhtml_url_t *r) { const WCHAR *p;
- if(strncmpiW(url, mhtml_prefixW, sizeof(mhtml_prefixW)/sizeof(WCHAR))) + if(strncmpiW(url, mhtml_prefixW, ARRAY_SIZE(mhtml_prefixW))) return E_FAIL;
- r->mhtml = url + sizeof(mhtml_prefixW)/sizeof(WCHAR); + r->mhtml = url + ARRAY_SIZE(mhtml_prefixW); p = strchrW(r->mhtml, '!'); if(p) { r->mhtml_len = p - r->mhtml; /* FIXME: We handle '!' and '!x-usc:' in URLs as the same thing. Those should not be the same. */ - if(!strncmpW(p, mhtml_separatorW, sizeof(mhtml_separatorW)/sizeof(WCHAR))) - p += sizeof(mhtml_separatorW)/sizeof(WCHAR); + if(!strncmpW(p, mhtml_separatorW, ARRAY_SIZE(mhtml_separatorW))) + p += ARRAY_SIZE(mhtml_separatorW); else p++; }else { @@ -657,7 +657,7 @@ static HRESULT WINAPI MimeHtmlProtocolInfo_CombineUrl(IInternetProtocolInfo *ifa DWORD cchResult, DWORD* pcchResult, DWORD dwReserved) { MimeHtmlProtocol *This = impl_from_IInternetProtocolInfo(iface); - size_t len = sizeof(mhtml_prefixW)/sizeof(WCHAR); + size_t len = ARRAY_SIZE(mhtml_prefixW); mhtml_url_t url; WCHAR *p; HRESULT hres; @@ -670,26 +670,26 @@ static HRESULT WINAPI MimeHtmlProtocolInfo_CombineUrl(IInternetProtocolInfo *ifa if(FAILED(hres)) return hres;
- if(!strncmpiW(pwzRelativeUrl, mhtml_prefixW, sizeof(mhtml_prefixW)/sizeof(WCHAR))) { + if(!strncmpiW(pwzRelativeUrl, mhtml_prefixW, ARRAY_SIZE(mhtml_prefixW))) { FIXME("Relative URL is mhtml protocol\n"); return INET_E_USE_DEFAULT_PROTOCOLHANDLER; }
len += url.mhtml_len; if(*pwzRelativeUrl) - len += strlenW(pwzRelativeUrl) + sizeof(mhtml_separatorW)/sizeof(WCHAR); + len += strlenW(pwzRelativeUrl) + ARRAY_SIZE(mhtml_separatorW); if(len >= cchResult) { *pcchResult = 0; return E_FAIL; }
memcpy(pwzResult, mhtml_prefixW, sizeof(mhtml_prefixW)); - p = pwzResult + sizeof(mhtml_prefixW)/sizeof(WCHAR); + p = pwzResult + ARRAY_SIZE(mhtml_prefixW); memcpy(p, url.mhtml, url.mhtml_len*sizeof(WCHAR)); p += url.mhtml_len; if(*pwzRelativeUrl) { memcpy(p, mhtml_separatorW, sizeof(mhtml_separatorW)); - p += sizeof(mhtml_separatorW)/sizeof(WCHAR); + p += ARRAY_SIZE(mhtml_separatorW); strcpyW(p, pwzRelativeUrl); }else { *p = 0; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 7d01cb3e41..841f112a5e 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -78,7 +78,7 @@ reactos/dll/win32/ieframe # Synced to WineStaging-3.17 reactos/dll/win32/imaadp32.acm # Synced to WineStaging-3.17 reactos/dll/win32/imagehlp # Synced to WineStaging-3.3 reactos/dll/win32/imm32 # Synced to WineStaging-3.17 -reactos/dll/win32/inetcomm # Synced to WineStaging-3.3 +reactos/dll/win32/inetcomm # Synced to WineStaging-3.17 reactos/dll/win32/inetmib1 # Synced to WineStaging-3.3 reactos/dll/win32/initpki # Synced to WineStaging-3.3 reactos/dll/win32/inseng # Synced to WineStaging-3.3