diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1997-04-12 17:25:26 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1997-04-12 17:25:26 +0000 |
commit | 61619bcb95ca78d1e65039ffb283aefddd8d0da8 (patch) | |
tree | 3d1c43404538e161f0bbd7acbf4d0a111469437c /bin/pax | |
parent | f4926098e93159b048942a79d88bcde3ea111391 (diff) |
We need to copy the pathnames we get from fgetln() on stdin, as the buffer
will be reused.
Diffstat (limited to 'bin/pax')
-rw-r--r-- | bin/pax/options.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/pax/options.c b/bin/pax/options.c index ab8fdf1a9ab..5c701044d8d 100644 --- a/bin/pax/options.c +++ b/bin/pax/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.22 1997/04/06 06:26:23 millert Exp $ */ +/* $OpenBSD: options.c,v 1.23 1997/04/12 17:25:25 tholo Exp $ */ /* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: options.c,v 1.22 1997/04/06 06:26:23 millert Exp $"; +static char rcsid[] = "$OpenBSD: options.c,v 1.23 1997/04/12 17:25:25 tholo Exp $"; #endif #endif /* not lint */ @@ -1147,7 +1147,7 @@ cpio_options(argc, argv) maxflt = 0; while ((str = fgetln(stdin, &len)) != NULL) { str[len - 1] = '\0'; - ftree_add(str, NULL); + ftree_add(strdup(str), NULL); } break; default: |