components/enscript/patches/enscript-1.6.1-CAN-2004-1186.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Fri, 12 Aug 2016 17:23:26 -0700
changeset 6610 88360f57667e
parent 1132 a62391631ea1
permissions -rw-r--r--
Close of build 106.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1132
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
--- enscript-1.6.1/src/psgen.c.CAN-2004-1186	2005-01-10 15:57:07.432740602 +0000
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
+++ enscript-1.6.1/src/psgen.c	2005-01-10 15:58:24.606016206 +0000
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
@@ -1914,8 +1914,9 @@
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
   else
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
     {
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
       ftail++;
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
-      strncpy (buf, fname, ftail - fname);
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
-      buf[ftail - fname] = '\0';
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
+      i = ftail - fname >= sizeof (buf)-1 ? sizeof (buf)-1 : ftail - fname;
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
+      strncpy (buf, fname, i);
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
+      buf[i] = '\0';
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
     }
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
 
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
   if (nup > 1)