From 5d1b524ff31a94b9716aa653bbd7bf680ba2e551 Mon Sep 17 00:00:00 2001 From: kleink Date: Wed, 25 Jun 1997 22:44:00 +0000 Subject: [PATCH] Fix OBOB: when reassembling a file name from the header block's `prefix' and `name' fields, don't overwrite the glueing '/' between them. --- bin/pax/tar.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/pax/tar.c b/bin/pax/tar.c index c5293113de83..8f37b7f45903 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -1,4 +1,4 @@ -/* $NetBSD: tar.c,v 1.7 1997/05/16 09:38:40 kleink Exp $ */ +/* $NetBSD: tar.c,v 1.8 1997/06/25 22:44:00 kleink Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$NetBSD: tar.c,v 1.7 1997/05/16 09:38:40 kleink Exp $"; +static char rcsid[] = "$NetBSD: tar.c,v 1.8 1997/06/25 22:44:00 kleink Exp $"; #endif #endif /* not lint */ @@ -833,6 +833,7 @@ ustar_rd(arcn, buf) cnt = l_strncpy(arcn->name, hd->prefix, sizeof(hd->prefix)); dest = arcn->name + arcn->nlen; *dest++ = '/'; + cnt++; } arcn->nlen = l_strncpy(dest, hd->name, sizeof(hd->name)); arcn->nlen += cnt;