components/texinfo/patches/manpage.patch
author James Chang <james.c.chang@Oracle.COM>
Thu, 12 Mar 2015 12:42:27 -0700
changeset 3937 11d6d96320f9
permissions -rw-r--r--
20570467 buffer overflow in info in get_manpage_node()

# Patch origin: internal
# buffer overflow in info in get_manpage_node()
# Sent to and incorporated into upstream

--- texinfo-4.13/info/man.c	Sat Jul  5 16:32:19 2008
+++ texinfo-4.13/info/man.c	Tue Mar  3 15:02:03 2015
@@ -83,7 +83,7 @@
           int hlen, plen;
 	  char *old_contents = file_buffer->contents;
 
-          sprintf (header, "\n\n%c\n%s %s,  %s %s,  %s (dir)\n\n",
+          snprintf (header, sizeof(header), "\n\n%c\n%s %s,  %s %s,  %s (dir)\n\n",
                    INFO_COOKIE,
                    INFO_FILE_LABEL, file_buffer->filename,
                    INFO_NODE_LABEL, pagename,