summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2012-04-21 06:08:02 +0000
committerdas <das@FreeBSD.org>2012-04-21 06:08:02 +0000
commit9da846a0f4d303010f8d4dd8526462ec0effe76e (patch)
tree192f51e48c88fc93f6418189fc285fc5003bd99e /lib/libc
parent5a4218fd168e3dfa11b5b58f3bb7403547db3311 (diff)
downloadFreeBSD-src-9da846a0f4d303010f8d4dd8526462ec0effe76e.zip
FreeBSD-src-9da846a0f4d303010f8d4dd8526462ec0effe76e.tar.gz
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
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/fputws.c2
1 files changed, 1 insertions, 1 deletions
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);
OpenPOWER on IntegriCloud