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: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a3cd6220e4
commit
4662dbd796
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue