From 432f9d20077426ffc35cb75f4ac1eaf10790d07b Mon Sep 17 00:00:00 2001 From: tholo Date: Sat, 12 Apr 1997 17:25:25 +0000 Subject: [PATCH] We need to copy the pathnames we get from fgetln() on stdin, as the buffer will be reused. --- bin/pax/options.c | 6 +++--- 1 file 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: -- 2.20.1