X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=lib%2Fdecompress_inflate.c;h=d619b28c456fc282d7d4c0c24db0ada6922601f6;hb=a39d16ab3f22d902ed08a3708496a96500f36a5e;hp=19ff89e34eec6b7aaec3d47b4a13aac9d6d70c1f;hpb=cb5520f02c010e3cb974b9ac06f30aafa2eebc38;p=karo-tx-linux.git diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c index 19ff89e34eec..d619b28c456f 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");