This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13983] __libc_message() shouldn't blindly write to STDERR_FILENO
- From: "polacek at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Sun, 15 Apr 2012 23:18:13 +0000
- Subject: [Bug libc/13983] __libc_message() shouldn't blindly write to STDERR_FILENO
- Auto-submitted: auto-generated
- References: <bug-13983-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13983
Marek Polacek <polacek at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |polacek at redhat dot com
--- Comment #1 from Marek Polacek <polacek at redhat dot com> 2012-04-15 23:18:13 UTC ---
E.g. here:
$ cat x.c
#include <stdio.h>
#include <string.h>
int
main (void)
{
fclose (stderr);
char a[5] = { };
strcpy (a, "foobarbaz");
}
$ gcc -O2 -D_FORTIFY_SOURCE=2 x.c
$ LIBC_FATAL_STDERR_=1 ./testrun.sh ./a.out
Aborted
we use stderr stream after it's been closed, which is undefined; it looks like
we really should check STDERR_FILENO before writing to it.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.