aboutsummaryrefslogtreecommitdiff
path: root/winsup/utils
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/path.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc
index 336408d..a76cf76 100644
--- a/winsup/utils/path.cc
+++ b/winsup/utils/path.cc
@@ -220,10 +220,10 @@ readlink (HANDLE fh, char *path, int maxlen)
}
if (*(PWCHAR) cp == 0xfeff) /* BOM */
{
- len = wcstombs (NULL, (wchar_t *) (cp + 2), 0);
- if (len == (size_t) -1 || len + 1 > maxlen)
+ size_t wlen = wcstombs (NULL, (wchar_t *) (cp + 2), 0);
+ if (wlen == (size_t) -1 || wlen + 1 > maxlen)
return false;
- wcstombs (path, (wchar_t *) (cp + 2), len + 1);
+ wcstombs (path, (wchar_t *) (cp + 2), wlen + 1);
}
else if (len + 1 > maxlen)
return false;
@@ -238,10 +238,10 @@ readlink (HANDLE fh, char *path, int maxlen)
cp = buf + strlen (SYMLINK_COOKIE);
if (*(PWCHAR) cp == 0xfeff) /* BOM */
{
- len = wcstombs (NULL, (wchar_t *) (cp + 2), 0);
- if (len == (size_t) -1 || len + 1 > maxlen)
+ size_t wlen = wcstombs (NULL, (wchar_t *) (cp + 2), 0);
+ if (wlen == (size_t) -1 || wlen + 1 > maxlen)
return false;
- wcstombs (path, (wchar_t *) (cp + 2), len + 1);
+ wcstombs (path, (wchar_t *) (cp + 2), wlen + 1);
}
else if (fi.nFileSizeLow - strlen (SYMLINK_COOKIE) > (unsigned) maxlen)
return false;