From: Paul Eggert Date: Thu, 1 Jul 2010 18:46:56 +0000 (-0700) Subject: Don't assume that sizeof (long) == 4 when computing statistics. X-Git-Tag: v1.5~71 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=bdb53ef1b17916cd039cc830280a1b453a7090d8;p=debian%2Fgzip Don't assume that sizeof (long) == 4 when computing statistics. * gzip.c (get_method): Don't assume sizeof (long) == 4. * zip.c (zip): Likewise. --- diff --git a/gzip.c b/gzip.c index 4762e88..411ca42 100644 --- a/gzip.c +++ b/gzip.c @@ -1391,7 +1391,7 @@ local int get_method(in) while (get_char() != 0) /* null */ ; } if (part_nb == 1) { - header_bytes = inptr + 2*sizeof(long); /* include crc and size */ + header_bytes = inptr + 2*4; /* include crc and size */ } } else if (memcmp(magic, PKZIP_MAGIC, 2) == 0 && inptr == 2 diff --git a/zip.c b/zip.c index a30a561..dc4a21c 100644 --- a/zip.c +++ b/zip.c @@ -96,7 +96,7 @@ int zip(in, out) /* Write the crc and uncompressed size */ put_long(crc); put_long((ulg)bytes_in); - header_bytes += 2*sizeof(long); + header_bytes += 2*4; flush_outbuf(); return OK;