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
1 changed files with 1 additions and 1 deletions

View File

@ -3377,7 +3377,7 @@ HRESULT WINAPI PathCreateFromUrlW(LPCWSTR pszUrl, LPWSTR pszPath,
len = src - pszUrl; len = src - pszUrl;
StrCpyNW(dst, pszUrl, len + 1); StrCpyNW(dst, pszUrl, len + 1);
dst += len; 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 */ /* 'Forget' to add a trailing '/', just like Windows */
src++; src++;