aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2004-07-21 10:54:57 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2004-07-21 10:54:57 +0000
commit1949a3470f29c5edaa5fc2770c2886d653fa68d1 (patch)
tree1c3c81fbcfab80a357977aa6546dc3166c9d5257 /lib/libc/stdio
parent5c0b01b42790dc2548c195c979a5053f19303411 (diff)
downloadsrc-1949a3470f29c5edaa5fc2770c2886d653fa68d1.tar.gz
src-1949a3470f29c5edaa5fc2770c2886d653fa68d1.zip
Notes
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/fputws.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/stdio/fputws.c b/lib/libc/stdio/fputws.c
index b5be7317ba72..025e1c00d198 100644
--- a/lib/libc/stdio/fputws.c
+++ b/lib/libc/stdio/fputws.c
@@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$");
#include "namespace.h"
#include <errno.h>
+#include <limits.h>
#include <stdio.h>
#include <wchar.h>
#include "un-namespace.h"
@@ -53,7 +54,7 @@ fputws(const wchar_t * __restrict ws, FILE * __restrict fp)
uio.uio_iovcnt = 1;
iov.iov_base = buf;
do {
- nbytes = __wcsrtombs(buf, &ws, sizeof(buf),
+ nbytes = __wcsnrtombs(buf, &ws, SIZE_T_MAX, sizeof(buf),
&fp->_extra->mbstate);
if (nbytes == (size_t)-1)
goto error;