Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3-0]: src/usr.bin/fsplit Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/e9978d7162f7
branches:  netbsd-3-0
changeset: 579512:e9978d7162f7
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Nov 23 17:58:46 2008 +0000

description:
Pull up following revision(s) (requested by dholland in ticket #1982):
        usr.bin/fsplit/fsplit.c: revision 1.26 via patch
Two robustness fixes:
   (1) make ridiculously small filename buffer larger;
   (2) don't accidentally try to generate files with names containing '/'.

diffstat:

 usr.bin/fsplit/fsplit.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 135d7010b036 -r e9978d7162f7 usr.bin/fsplit/fsplit.c
--- a/usr.bin/fsplit/fsplit.c   Sat Nov 22 17:12:22 2008 +0000
+++ b/usr.bin/fsplit/fsplit.c   Sun Nov 23 17:58:46 2008 +0000
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "from: @(#)fsplit.c     8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: fsplit.c,v 1.11 2004/10/30 17:27:28 dsl Exp $");
+__RCSID("$NetBSD: fsplit.c,v 1.11.4.1 2008/11/23 17:58:46 bouyer Exp $");
 #endif
 #endif /* not lint */
 
@@ -118,7 +118,7 @@
        char *ptr;
        int nflag;      /* 1 if got name of subprog., 0 otherwise */
        int retval, i;
-       char name[20], *extrptr = extrbuf;
+       char name[80], *extrptr = extrbuf;
 
        /*  scan -e options */
        while ( argc > 1  && argv[1][0] == '-' && argv[1][1] == 'e') {
@@ -357,7 +357,7 @@
        trim(ptr);
        sptr = s;
        while (*ptr != '(' && *ptr != '\n') {
-               if (*ptr != ' ' && *ptr != '\t')
+               if (*ptr != ' ' && *ptr != '\t' && *ptr != '/')
                        *sptr++ = *ptr;
                ptr++;
        }



Home | Main Index | Thread Index | Old Index