From 9da846a0f4d303010f8d4dd8526462ec0effe76e Mon Sep 17 00:00:00 2001 From: das Date: Sat, 21 Apr 2012 06:08:02 +0000 Subject: Fix a bug introduced in r187302 that was causing fputws() to enter an infinite loop pretty much unconditionally. It's remarkable that the patch that introduced the bug was never tested, but even more remarkable that nobody noticed for over two years. PR: 167039 MFC after: 3 days --- lib/libc/stdio/fputws.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/stdio') diff --git a/lib/libc/stdio/fputws.c b/lib/libc/stdio/fputws.c index a318e2d..d9dc4dfb 100644 --- a/lib/libc/stdio/fputws.c +++ b/lib/libc/stdio/fputws.c @@ -70,7 +70,7 @@ fputws_l(const wchar_t * __restrict ws, FILE * __restrict fp, locale_t locale) iov.iov_len = uio.uio_resid = nbytes; if (__sfvwrite(fp, &uio) != 0) goto error; - } while (ws != NULL); + } while (wsp != NULL); FUNLOCKFILE(fp); return (0); -- cgit v1.1