projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5a7e4d
)
Fixed sign-compare warnings
author
Armin Novak
<armin.novak@thincast.com>
Thu, 7 Feb 2019 13:35:58 +0000
(14:35 +0100)
committer
Armin Novak
<armin.novak@thincast.com>
Fri, 5 Apr 2019 07:13:24 +0000
(09:13 +0200)
winpr/libwinpr/path/path.c
patch
|
blob
|
history
diff --git
a/winpr/libwinpr/path/path.c
b/winpr/libwinpr/path/path.c
index
1cd9518
..
6c8477a
100644
(file)
--- a/
winpr/libwinpr/path/path.c
+++ b/
winpr/libwinpr/path/path.c
@@
-720,10
+720,12
@@
HRESULT PathCchStripPrefixW(PWSTR pszPath, size_t cchPath)
if (hasPrefix)
{
+ int rc;
if (cchPath < 6)
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);
if (IsCharAlphaW(pszPath[4]) && (pszPath[5] == L':')) /* like C: */