about summary refs log tree commit diff
path: root/debug/mbstowcs_chk.c
diff options
context:
space:
mode:
Diffstat (limited to 'debug/mbstowcs_chk.c')
-rw-r--r--debug/mbstowcs_chk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/debug/mbstowcs_chk.c b/debug/mbstowcs_chk.c
index 2c1c3bb2c1..d1403c5d2b 100644
--- a/debug/mbstowcs_chk.c
+++ b/debug/mbstowcs_chk.c
@@ -22,14 +22,14 @@
 
 
 size_t
-__mbstowcs_chk (wchar_t *dst, const char **src, size_t len, size_t dstlen)
+__mbstowcs_chk (wchar_t *dst, const char *src, size_t len, size_t dstlen)
 {
-  if (__builtin_expect (dstlen < len * sizeof (wchar_t), 0))
+  if (__builtin_expect (dstlen < len, 0))
     __chk_fail ();
 
   mbstate_t state;
 
   memset (&state, '\0', sizeof state);
   /* Return how many we wrote (or maybe an error).  */
-  return __mbsrtowcs (dst, src, len, &state);
+  return __mbsrtowcs (dst, &src, len, &state);
 }