diff options
author | 1997-04-12 17:25:25 +0000 | |
---|---|---|
committer | 1997-04-12 17:25:25 +0000 | |
commit | 432f9d20077426ffc35cb75f4ac1eaf10790d07b (patch) | |
tree | a90a46b72843776da05450512fc028cfd7d587d5 | |
parent | careful about bad domain/mapnames (diff) | |
download | wireguard-openbsd-432f9d20077426ffc35cb75f4ac1eaf10790d07b.tar.xz wireguard-openbsd-432f9d20077426ffc35cb75f4ac1eaf10790d07b.zip |
We need to copy the pathnames we get from fgetln() on stdin, as the buffer
will be reused.
-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: |