components/enscript/patches/enscript-1.6.1-CAN-2004-1186.patch
author Jiri Sasek <Jiri.Sasek@Oracle.COM>
Mon, 07 Jul 2014 04:16:19 -0700
changeset 1986 ec77e9bb9f57
parent 1132 a62391631ea1
permissions -rw-r--r--
17027615 smbd still dumps core with patch 119758-27(SAMBA 3.6.12) in AIO mode with SAMFS
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)