components/texinfo/patches/manpage.patch
changeset 5628 f2a8a7ecf3e1
parent 5627 883d0a6701e4
child 5629 798c7e974fff
equal deleted inserted replaced
5627:883d0a6701e4 5628:f2a8a7ecf3e1
     1 # Patch origin: internal
       
     2 # buffer overflow in info in get_manpage_node()
       
     3 # Sent to and incorporated into upstream
       
     4 
       
     5 --- texinfo-4.13/info/man.c	Sat Jul  5 16:32:19 2008
       
     6 +++ texinfo-4.13/info/man.c	Tue Mar  3 15:02:03 2015
       
     7 @@ -83,7 +83,7 @@
       
     8            int hlen, plen;
       
     9  	  char *old_contents = file_buffer->contents;
       
    10  
       
    11 -          sprintf (header, "\n\n%c\n%s %s,  %s %s,  %s (dir)\n\n",
       
    12 +          snprintf (header, sizeof(header), "\n\n%c\n%s %s,  %s %s,  %s (dir)\n\n",
       
    13                     INFO_COOKIE,
       
    14                     INFO_FILE_LABEL, file_buffer->filename,
       
    15                     INFO_NODE_LABEL, pagename,