From 73b414e35bb2d18ee8e7c6a46c46fd4a5d24977c Mon Sep 17 00:00:00 2001 From: das Date: Sat, 21 Apr 2012 07:31:27 +0000 Subject: As noted by Peter Jeremy, r234528 only partially fixed the infinite loop bug introduced in r187302. This completes the fix. PR: 167039 MFC after: 3 days --- lib/libc/stdio/fputws.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libc/stdio/fputws.c b/lib/libc/stdio/fputws.c index d9dc4dfb..fa8d317 100644 --- a/lib/libc/stdio/fputws.c +++ b/lib/libc/stdio/fputws.c @@ -61,8 +61,8 @@ fputws_l(const wchar_t * __restrict ws, FILE * __restrict fp, locale_t locale) uio.uio_iov = &iov; uio.uio_iovcnt = 1; iov.iov_base = buf; + wsp = ws; do { - wsp = ws; nbytes = l->__wcsnrtombs(buf, &wsp, SIZE_T_MAX, sizeof(buf), &fp->_mbstate); if (nbytes == (size_t)-1) -- cgit v1.1