summaryrefslogtreecommitdiff
path: root/win32/winutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/winutil.c')
-rw-r--r--win32/winutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/winutil.c b/win32/winutil.c
index 2852a19e30..34dda95498 100644
--- a/win32/winutil.c
+++ b/win32/winutil.c
@@ -36,9 +36,9 @@ PHP_WINUTIL_API char *php_win32_error_to_msg(HRESULT error)
return (buf ? (char *) buf : "");
}/*}}}*/
-int php_win32_check_trailing_space(const char * path, const int path_len)
+int php_win32_check_trailing_space(const char * path, const size_t path_len)
{/*{{{*/
- if (path_len < 1) {
+ if (path_len > MAXPATHLEN - 1) {
return 1;
}
if (path) {