Fix stack smash problem in makeinfo, by increasing buffer sizes in

current_chapter_number().
This commit is contained in:
Dimitry Andric 2011-05-03 14:43:16 +00:00
parent 827a0e05b7
commit 20ff6c114f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=221386

View file

@ -256,13 +256,13 @@ current_chapter_number (void)
return xstrdup ("");
else if (enum_marker == APPENDIX_MAGIC)
{
char s[1];
char s[2];
sprintf (s, "%c", numbers[0] + 64);
return xstrdup (s);
}
else
{
char s[5];
char s[11];
sprintf (s, "%d", numbers[0]);
return xstrdup (s);
}