diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2004-05-02 23:07:49 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2004-05-02 23:07:49 +0000 |
commit | 774cd1faf6f6bb3cb9cf8297b3d64817560cbe18 (patch) | |
tree | c6e7dc243b280cc28d9553fd1b7169ec572626fc /gnu | |
parent | f1fe72c1ccb2799547c76acc3729b4f150aedb4a (diff) | |
download | src-774cd1faf6f6bb3cb9cf8297b3d64817560cbe18.tar.gz src-774cd1faf6f6bb3cb9cf8297b3d64817560cbe18.zip |
Gzip assumes 'unsigned long' is 32-bits wide and depends on this.
One thing Gzip does is implicitly by store the size of a file into an
'unsigned long' rather than explicitly compute the remainder modulo 2^32
(see RFC 1952 section 2.3.1 "ISIZE"). Thus an extracted file size is
does not equal the original size (mod 2^32) for files larger than 4GB.
This manifests itself in errors such as:
zcat: bigfile.gz: invalid compressed data--length error
PR: 66008, 66009
Submitted by: Peter Losher <Peter_Losher@isc.org>
Patch by: tjr
Notes
Notes:
svn path=/head/; revision=128849
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/gzip/gzip.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gnu/usr.bin/gzip/gzip.h b/gnu/usr.bin/gzip/gzip.h index 1ec96cb6d825..79b0efd95980 100644 --- a/gnu/usr.bin/gzip/gzip.h +++ b/gnu/usr.bin/gzip/gzip.h @@ -2,6 +2,8 @@ * Copyright (C) 1992-1993 Jean-loup Gailly. * This is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License, see the file COPYING. + * + * $FreeBSD$ */ #if defined(__STDC__) || defined(PROTO) @@ -41,9 +43,10 @@ #define local static -typedef unsigned char uch; -typedef unsigned short ush; -typedef unsigned long ulg; +#include <stdint.h> +typedef uint8_t uch; +typedef uint16_t ush; +typedef uint32_t ulg; /* Return codes from gzip */ #define OK 0 |