diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2021-06-14 00:36:14 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2021-06-14 00:36:14 +0000 |
commit | 521ba0ecc19fde9c5f596d0e5fd79e29628062c4 (patch) | |
tree | ecc142764f508ba7f00ae4a623e2d62e0ffa1514 /bin/pax | |
parent | c520201718147c227cda467c0a43a541e3c85f56 (diff) |
32-bit systems incorrectly parse the (64-bit) length of ustar extended
headers (hd->size) using a 32-bit operation.
from Samanta Navarro
ok guenther
Diffstat (limited to 'bin/pax')
-rw-r--r-- | bin/pax/tar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/pax/tar.c b/bin/pax/tar.c index eb93d28737c..9d8a92d9d13 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tar.c,v 1.68 2019/06/24 03:33:09 deraadt Exp $ */ +/* $OpenBSD: tar.c,v 1.69 2021/06/14 00:36:13 deraadt Exp $ */ /* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */ /*- @@ -732,7 +732,7 @@ reset: /* Process Extended headers. */ if (hd->typeflag == XHDRTYPE || hd->typeflag == GHDRTYPE) { if (rd_xheader(arcn, hd->typeflag == GHDRTYPE, - (off_t)asc_ul(hd->size, sizeof(hd->size), OCT)) < 0) + (off_t)asc_ull(hd->size, sizeof(hd->size), OCT)) < 0) return (-1); /* Update and check the ustar header. */ |