summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-05-03 14:43:16 +0000
committerdim <dim@FreeBSD.org>2011-05-03 14:43:16 +0000
commitf6ca5e58d1a52a3a09d708212e6aa7dade97c550 (patch)
treeb5e8fd22b6d4ea7fec852b1aa597c3c907ed7810
parent14ab9d31d300b0e31c4b5c1c4e23901b5a4edd36 (diff)
downloadFreeBSD-src-f6ca5e58d1a52a3a09d708212e6aa7dade97c550.zip
FreeBSD-src-f6ca5e58d1a52a3a09d708212e6aa7dade97c550.tar.gz
Fix stack smash problem in makeinfo, by increasing buffer sizes in
current_chapter_number().
-rw-r--r--contrib/texinfo/makeinfo/sectioning.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/texinfo/makeinfo/sectioning.c b/contrib/texinfo/makeinfo/sectioning.c
index ce32aeb..1683d11 100644
--- a/contrib/texinfo/makeinfo/sectioning.c
+++ b/contrib/texinfo/makeinfo/sectioning.c
@@ -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);
}
OpenPOWER on IntegriCloud