Commit 4662dbd7 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

mfplat: Correctly calculate url scheme length.

When a url is passed in, for example "http://..." We need to include the : in the scheme string not exclude it. Signed-off-by: 's avatarAlistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: 's avatarNikolay Sivov <nsivov@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a3cd6220
...@@ -6469,10 +6469,11 @@ static HRESULT resolver_get_scheme_handler(const WCHAR *url, DWORD flags, IMFSch ...@@ -6469,10 +6469,11 @@ static HRESULT resolver_get_scheme_handler(const WCHAR *url, DWORD flags, IMFSch
if (ptr == url || *ptr != ':') if (ptr == url || *ptr != ':')
{ {
url = fileschemeW; url = fileschemeW;
ptr = fileschemeW + ARRAY_SIZE(fileschemeW) - 1; len = ARRAY_SIZE(fileschemeW) - 1;
} }
else
len = ptr - url + 1;
len = ptr - url;
scheme = malloc((len + 1) * sizeof(WCHAR)); scheme = malloc((len + 1) * sizeof(WCHAR));
if (!scheme) if (!scheme)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
......
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