Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 May 2011 14:43:16 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221386 - head/contrib/texinfo/makeinfo
Message-ID:  <201105031443.p43EhGhj097950@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Tue May  3 14:43:16 2011
New Revision: 221386
URL: http://svn.freebsd.org/changeset/base/221386

Log:
  Fix stack smash problem in makeinfo, by increasing buffer sizes in
  current_chapter_number().

Modified:
  head/contrib/texinfo/makeinfo/sectioning.c

Modified: head/contrib/texinfo/makeinfo/sectioning.c
==============================================================================
--- head/contrib/texinfo/makeinfo/sectioning.c	Tue May  3 13:34:40 2011	(r221385)
+++ head/contrib/texinfo/makeinfo/sectioning.c	Tue May  3 14:43:16 2011	(r221386)
@@ -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);
     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105031443.p43EhGhj097950>