author | jkohoute <jan.kohoutek@oracle.com> |
Thu, 05 May 2016 02:19:04 -0700 | |
branch | s11u3-sru |
changeset 5925 | b08608def607 |
parent 2723 | 138732f62341 |
permissions | -rw-r--r-- |
2723
138732f62341
17219320 Various Userland components should be back-ported to 11.2
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 |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
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 |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
3 |
@@ -1914,8 +1914,9 @@ |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
4 |
else |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
5 |
{ |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
6 |
ftail++; |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
7 |
- strncpy (buf, fname, ftail - fname); |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
8 |
- buf[ftail - fname] = '\0'; |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
9 |
+ i = ftail - fname >= sizeof (buf)-1 ? sizeof (buf)-1 : ftail - fname; |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
10 |
+ strncpy (buf, fname, i); |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
11 |
+ buf[i] = '\0'; |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
12 |
} |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
13 |
|
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
14 |
if (nup > 1) |