X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=lib%2Fdecompress_inflate.c;h=d619b28c456fc282d7d4c0c24db0ada6922601f6;hb=389e067032fbb96e439abafae848dd447e4cafb4;hp=19ff89e34eec6b7aaec3d47b4a13aac9d6d70c1f;hpb=e11d57ca0b6dada29007ce3ad3db6c84034a768f;p=~andy%2Flinux diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c index 19ff89e34ee..d619b28c456 100644 --- a/lib/decompress_inflate.c +++ b/lib/decompress_inflate.c @@ -48,7 +48,7 @@ STATIC int INIT gunzip(unsigned char *buf, int len, out_len = 0x8000; /* 32 K */ out_buf = malloc(out_len); } else { - out_len = 0x7fffffff; /* no limit */ + out_len = ((size_t)~0) - (size_t)out_buf; /* no limit */ } if (!out_buf) { error("Out of memory while allocating output buffer");