add python/ipaddress-1.0.18
[unleashed-userland.git] / components / enscript / patches / enscript-1.6.1-CAN-2004-1186.patch
blob7c8f8e1d2ff2edcac4cb207fa94c76092fce3c99
1 --- enscript-1.6.1/src/psgen.c.CAN-2004-1186 2005-01-10 15:57:07.432740602 +0000
2 +++ enscript-1.6.1/src/psgen.c 2005-01-10 15:58:24.606016206 +0000
3 @@ -1914,8 +1914,9 @@
4 else
6 ftail++;
7 - strncpy (buf, fname, ftail - fname);
8 - buf[ftail - fname] = '\0';
9 + i = ftail - fname >= sizeof (buf)-1 ? sizeof (buf)-1 : ftail - fname;
10 + strncpy (buf, fname, i);
11 + buf[i] = '\0';
14 if (nup > 1)