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

This commit is contained in:
Bruno Jesus 2014-05-29 23:57:51 -03:00 committed by Alexandre Julliard
parent 1f713cc567
commit 9dacce1b4e

View file

@ -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++;