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

Alexandre Julliard julliard at winehq.org
Wed Jun 11 13:36:23 CDT 2014


Module: wine
Branch: master
Commit: 9dacce1b4e58ebfe33d317ecb7ac7719552a9894
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9dacce1b4e58ebfe33d317ecb7ac7719552a9894

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Thu May 29 23:57:51 2014 -0300

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

---

 dlls/shlwapi/path.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/shlwapi/path.c b/dlls/shlwapi/path.c
index 080c243..01e3ae7 100644
--- a/dlls/shlwapi/path.c
+++ b/dlls/shlwapi/path.c
@@ -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++;




More information about the wine-cvs mailing list