summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2005-04-14 08:24:10 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2005-04-14 08:24:10 +0000
commitcaee5b7d73cdcf1d966b790e3693bccc41de4e97 (patch)
tree8a355687162e163e812d5ffc6d54ee5397ea73d6 /bin
parent43659c9c966d061a20cb44d5ee9f1db9dd072233 (diff)
add the prefix length to nlen for ustar; ok otto millert
Diffstat (limited to 'bin')
-rw-r--r--bin/pax/tar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/pax/tar.c b/bin/pax/tar.c
index 9708f690fd4..50b1585ef50 100644
--- a/bin/pax/tar.c
+++ b/bin/pax/tar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tar.c,v 1.35 2005/04/10 18:08:53 otto Exp $ */
+/* $OpenBSD: tar.c,v 1.36 2005/04/14 08:24:09 markus Exp $ */
/* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static const char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94";
#else
-static const char rcsid[] = "$OpenBSD: tar.c,v 1.35 2005/04/10 18:08:53 otto Exp $";
+static const char rcsid[] = "$OpenBSD: tar.c,v 1.36 2005/04/14 08:24:09 markus Exp $";
#endif
#endif /* not lint */
@@ -772,7 +772,7 @@ ustar_rd(ARCHD *arcn, char *buf)
}
if (hd->typeflag != LONGLINKTYPE && hd->typeflag != LONGNAMETYPE) {
- arcn->nlen = expandname(dest, sizeof(arcn->name) - cnt,
+ arcn->nlen = cnt + expandname(dest, sizeof(arcn->name) - cnt,
&gnu_name_string, hd->name, sizeof(hd->name));
arcn->ln_nlen = expandname(arcn->ln_name, sizeof(arcn->ln_name),
&gnu_link_string, hd->linkname, sizeof(hd->linkname));