Date: Wed, 18 Apr 2012 07:00:59 +1000 (EST) From: Peter Jeremy <peterjeremy@acm.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/167039: fputws(3) generates infinite output Message-ID: <201204172100.q3HL0xPW032482@server.vk2pj.dyndns.org> Resent-Message-ID: <201204172110.q3HLA2MD094422@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 167039
>Category: bin
>Synopsis: fputws(3) generates infinite output
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Apr 17 21:10:02 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Peter Jeremy
>Release: FreeBSD 8.2-STABLE amd64
>Organization:
n/a
>Environment:
System: FreeBSD server.vk2pj.dyndns.org 8.2-STABLE FreeBSD 8.2-STABLE #15: Thu Feb 2 11:02:29 EST 2012 root@server.vk2pj.dyndns.org:/var/obj/usr/src/sys/server amd64
>Description:
Programs using fputws(3) generate an apparently infinite
number of copies of the string passed to fputws().
The code in src/lib/libc/stdio/fputws.c has no obvious mechanism
for loop termination except in the case of an error. This
appears to be a regression introduced in r187302.
>How-To-Repeat:
The following sample code generates an infinite series of "abc":
#include <stdio.h>
#include <wchar.h>
int main(void)
{
fputws(L"abc", stdout);
putchar('\n');
return(0);
}
>Fix:
Not clear at present.
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204172100.q3HL0xPW032482>
