summary refs log tree commit diff
path: root/wcsmbs/wcsrtombs.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/wcsrtombs.c')
-rw-r--r--wcsmbs/wcsrtombs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wcsmbs/wcsrtombs.c b/wcsmbs/wcsrtombs.c
index 5ab84814a0..a8105d5b85 100644
--- a/wcsmbs/wcsrtombs.c
+++ b/wcsmbs/wcsrtombs.c
@@ -94,7 +94,7 @@ __wcsrtombs (dst, src, len, ps)
       /* This code is based on the safe assumption that all internal
 	 multi-byte encodings use the NUL byte only to mark the end
 	 of the string.  */
-      const wchar_t *srcend = *src + __wcsnlen (*src, len * MB_CUR_MAX) + 1;
+      const wchar_t *srcend = *src + __wcsnlen (*src, len) + 1;
       size_t dummy;
 
       data.__outbuf = dst;