Created attachment 5215 [details] 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; }
I checked in a patch and a test case.
for reference, the change: https://sourceware.org/git/?p=glibc.git;a=commit;h=84a4211850e3d23a9d3a4f3b294752a3b30bc0ff