ar_subs.c (007d33500e91b61271d9374c5994f1bdf89b0890) | ar_subs.c (5b421cac1a84ddc38e9e190fabfc5a5dff53deaf) |
---|---|
1/*- 2 * Copyright (c) 1992 Keith Muller. 3 * Copyright (c) 1992, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Keith Muller of the University of California, San Diego. 8 * --- 20 unchanged lines hidden (view full) --- 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * | 1/*- 2 * Copyright (c) 1992 Keith Muller. 3 * Copyright (c) 1992, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Keith Muller of the University of California, San Diego. 8 * --- 20 unchanged lines hidden (view full) --- 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * |
37 * $Id: ar_subs.c,v 1.8 1997/08/29 16:12:19 sos Exp $ | 37 * $Id: ar_subs.c,v 1.9 1997/12/10 22:18:25 eivind Exp $ |
38 */ 39 40#ifndef lint 41static char const sccsid[] = "@(#)ar_subs.c 8.2 (Berkeley) 4/18/94"; 42#endif /* not lint */ 43 44#include <sys/types.h> 45#include <sys/time.h> --- 691 unchanged lines hidden (view full) --- 737 ARCHD archd; 738 char dirbuf[PAXPATHLEN+1]; 739 740 arcn = &archd; 741 /* 742 * set up the destination dir path and make sure it is a directory. We 743 * make sure we have a trailing / on the destination 744 */ | 38 */ 39 40#ifndef lint 41static char const sccsid[] = "@(#)ar_subs.c 8.2 (Berkeley) 4/18/94"; 42#endif /* not lint */ 43 44#include <sys/types.h> 45#include <sys/time.h> --- 691 unchanged lines hidden (view full) --- 737 ARCHD archd; 738 char dirbuf[PAXPATHLEN+1]; 739 740 arcn = &archd; 741 /* 742 * set up the destination dir path and make sure it is a directory. We 743 * make sure we have a trailing / on the destination 744 */ |
745 dlen = l_strncpy(dirbuf, dirptr, PAXPATHLEN); | 745 dlen = l_strncpy(dirbuf, dirptr, sizeof(dirbuf) - 1); |
746 dest_pt = dirbuf + dlen; 747 if (*(dest_pt-1) != '/') { 748 *dest_pt++ = '/'; 749 ++dlen; 750 } 751 *dest_pt = '\0'; 752 drem = PAXPATHLEN - dlen; 753 --- 485 unchanged lines hidden --- | 746 dest_pt = dirbuf + dlen; 747 if (*(dest_pt-1) != '/') { 748 *dest_pt++ = '/'; 749 ++dlen; 750 } 751 *dest_pt = '\0'; 752 drem = PAXPATHLEN - dlen; 753 --- 485 unchanged lines hidden --- |