From 84079f4a1ef4c3c10ef81da33e75949ca8ab8347 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sun, 9 Jul 2017 15:31:05 +0200 Subject: cleanup casts --- win32/winutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'win32/winutil.c') 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) { -- cgit v1.2.1