20570467 buffer overflow in info in get_manpage_node() s11-update
authorJames Chang <james.c.chang@Oracle.COM>
Mon, 16 Mar 2015 10:28:40 -0700
branchs11-update
changeset 3952 746ec6382a1f
parent 3948 568dd7b9cf04
child 3954 7e6addf418e2
20570467 buffer overflow in info in get_manpage_node() f
components/texinfo/patches/man.c.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/texinfo/patches/man.c.patch	Mon Mar 16 10:28:40 2015 -0700
@@ -0,0 +1,15 @@
+# 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,