From owner-freebsd-bugs Wed Aug 11 7:51:13 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 96D8114CF8 for ; Wed, 11 Aug 1999 07:51:10 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA78522; Wed, 11 Aug 1999 07:50:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Wed, 11 Aug 1999 07:50:03 -0700 (PDT) Message-Id: <199908111450.HAA78522@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: adrian@freebsd.org Subject: Re: bin/9123 pax can't read tar archives that contain files >4GB Reply-To: adrian@freebsd.org Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/9123; it has been noted by GNATS. From: adrian@freebsd.org To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: bin/9123 pax can't read tar archives that contain files >4GB Date: Wed, 11 Aug 1999 22:47:32 +0800 The patch submitted works fine as far as I can tell, however I'd be tempted to typecast it to off_t since that is what st_size wants. Index: tar.c =================================================================== RCS file: /home/ncvs/src/bin/pax/tar.c,v retrieving revision 1.12 diff -u -r1.12 tar.c --- tar.c 1999/05/08 10:21:20 1.12 +++ tar.c 1999/08/11 14:24:07 @@ -459,7 +459,7 @@ 0xfff); arcn->sb.st_uid = (uid_t)asc_ul(hd->uid, sizeof(hd->uid), OCT); arcn->sb.st_gid = (gid_t)asc_ul(hd->gid, sizeof(hd->gid), OCT); - arcn->sb.st_size = (size_t)asc_ul(hd->size, sizeof(hd->size), OCT); + arcn->sb.st_size = (off_t)asc_uqd(hd->size, sizeof(hd->size), OCT); arcn->sb.st_mtime = (time_t)asc_ul(hd->mtime, sizeof(hd->mtime), OCT); arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime; @@ -840,7 +840,7 @@ */ arcn->sb.st_mode = (mode_t)(asc_ul(hd->mode, sizeof(hd->mode), OCT) & 0xfff); - arcn->sb.st_size = (size_t)asc_ul(hd->size, sizeof(hd->size), OCT); + arcn->sb.st_size = (off_t)asc_uqd(hd->size, sizeof(hd->size), OCT); arcn->sb.st_mtime = (time_t)asc_ul(hd->mtime, sizeof(hd->mtime), OCT); arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime; See if it works for you, if it does, let me know and it should be committed. Adrian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message