Author: das
Date: Sat Apr 21 06:08:02 2012
New Revision: 234528
URL: http://svn.freebsd.org/changeset/base/234528

Log:
  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

Modified:
  head/lib/libc/stdio/fputws.c

Modified: head/lib/libc/stdio/fputws.c
==============================================================================
--- head/lib/libc/stdio/fputws.c        Sat Apr 21 05:26:02 2012        
(r234527)
+++ head/lib/libc/stdio/fputws.c        Sat Apr 21 06:08:02 2012        
(r234528)
@@ -70,7 +70,7 @@ fputws_l(const wchar_t * __restrict ws, 
                iov.iov_len = uio.uio_resid = nbytes;
                if (__sfvwrite(fp, &uio) != 0)
                        goto error;
-       } while (ws != NULL);
+       } while (wsp != NULL);
        FUNLOCKFILE(fp);
        return (0);
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to