| Summary: | Re: pr bin/9123 pax can't read tar archives that contain files >4GB | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Adrian Chadd <adrian> |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | CC: | rtm |
| Priority: | Normal | ||
| Version: | 1.0-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: gnats-admin->freebsd-bugs Misfiled Pr. State Changed From-To: open->closed Bastard PR. |
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