This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12445] New: printf() stack corruption in case of positional parameters + many format specs
- From: "pasky at suse dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Thu, 27 Jan 2011 00:24:12 +0000
- Subject: [Bug libc/12445] New: printf() stack corruption in case of positional parameters + many format specs
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=12445
Summary: printf() stack corruption in case of positional
parameters + many format specs
Product: glibc
Version: 2.12
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: pasky@suse.cz
Created attachment 5215
--> http://sourceware.org/bugzilla/attachment.cgi?id=5215
proposed patch
A seldom-used code branch in vfprintf causes stack corruption in this (minimal)
testcase:
#include <stdio.h>
int main()
{
printf ("\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
"a", "b", "c", "d", 5);
return 0;
}
--
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.