mirror of https://github.com/FreeRDP/FreeRDP
Fixed sign-compare warnings
This commit is contained in:
parent
b5a7e4d9b9
commit
309fe960f7
|
@ -720,10 +720,12 @@ HRESULT PathCchStripPrefixW(PWSTR pszPath, size_t cchPath)
|
||||||
|
|
||||||
if (hasPrefix)
|
if (hasPrefix)
|
||||||
{
|
{
|
||||||
|
int rc;
|
||||||
if (cchPath < 6)
|
if (cchPath < 6)
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
|
|
||||||
if (cchPath < (lstrlenW(&pszPath[4]) + 1))
|
rc = (lstrlenW(&pszPath[4]) + 1);
|
||||||
|
if ((rc < 0) || ((INT64)cchPath < rc))
|
||||||
return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
|
return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
|
||||||
|
|
||||||
if (IsCharAlphaW(pszPath[4]) && (pszPath[5] == L':')) /* like C: */
|
if (IsCharAlphaW(pszPath[4]) && (pszPath[5] == L':')) /* like C: */
|
||||||
|
|
Loading…
Reference in New Issue