X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/d6f31ecf904f01f8a2aab2bca55e33b1b51e0b4d..c33e8be1506a75e393304af89d64e3f46e0ca7cb:/dist/Cwd/Cwd.xs diff --git a/dist/Cwd/Cwd.xs b/dist/Cwd/Cwd.xs index 123be68..421c9df 100644 --- a/dist/Cwd/Cwd.xs +++ b/dist/Cwd/Cwd.xs @@ -106,7 +106,7 @@ bsd_realpath(const char *path, char resolved[MAXPATHLEN]) */ p = strchr(left, '/'); s = p ? p : left + left_len; - if (s - left >= sizeof(next_token)) { + if ((STRLEN)(s - left) >= (STRLEN)sizeof(next_token)) { errno = ENAMETOOLONG; return (NULL); } @@ -190,7 +190,7 @@ bsd_realpath(const char *path, char resolved[MAXPATHLEN]) */ if (p != NULL) { if (symlink[slen - 1] != '/') { - if (slen + 1 >= sizeof(symlink)) { + if ((STRLEN)(slen + 1) >= (STRLEN)sizeof(symlink)) { errno = ENAMETOOLONG; return (NULL); }