Commit 9dacce1b authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

shlwapi: Avoid reading past the pointer in PathCreateFromUrlW (valgrind).

parent 1f713cc5
......@@ -3377,7 +3377,7 @@ HRESULT WINAPI PathCreateFromUrlW(LPCWSTR pszUrl, LPWSTR pszPath,
len = src - pszUrl;
StrCpyNW(dst, pszUrl, len + 1);
dst += len;
if (isalphaW(src[1]) && (src[2] == ':' || src[2] == '|'))
if (*src && isalphaW(src[1]) && (src[2] == ':' || src[2] == '|'))
{
/* 'Forget' to add a trailing '/', just like Windows */
src++;
......
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