Commit c9b69946 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

shlwapi: Fixed bad pointer arithmentic by removing sizeof() (Coverity).

parent b08d4f59
......@@ -744,7 +744,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
if (base.nScheme == URL_SCHEME_HTTP || base.nScheme == URL_SCHEME_HTTPS)
manual_search = TRUE;
else if (work - base.pszSuffix > len_htmW * sizeof(WCHAR)) {
else if (work - base.pszSuffix > len_htmW) {
work -= len_htmW;
if (strncmpiW(work, htmW, len_htmW) == 0)
manual_search = TRUE;
......@@ -752,7 +752,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
}
if (!manual_search &&
work - base.pszSuffix > len_htmlW * sizeof(WCHAR)) {
work - base.pszSuffix > len_htmlW) {
work -= len_htmlW;
if (strncmpiW(work, htmlW, len_htmlW) == 0)
manual_search = TRUE;
......
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