0d0df4fcbf
* execute/960327-1.c (f): Add a letter to s[] to avoid stack-frame overwrite. From-SVN: r32939
31 lines
288 B
C
31 lines
288 B
C
#include <stdio.h>
|
|
g ()
|
|
{
|
|
return '\n';
|
|
}
|
|
|
|
f ()
|
|
{
|
|
char s[] = "abcedfg012345";
|
|
char *sp = s + 12;
|
|
|
|
switch (g ())
|
|
{
|
|
case '\n':
|
|
break;
|
|
}
|
|
|
|
while (*--sp == '0')
|
|
;
|
|
sprintf (sp + 1, "X");
|
|
|
|
if (s[12] != 'X')
|
|
abort ();
|
|
}
|
|
|
|
main ()
|
|
{
|
|
f ();
|
|
exit (0);
|
|
}
|