Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Aug 1999 07:50:03 -0700 (PDT)
From:      adrian@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/9123 pax can't read tar archives that contain files >4GB
Message-ID:  <199908111450.HAA78522@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908111450.HAA78522>