X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2Fdecompress_inflate.c;h=d619b28c456fc282d7d4c0c24db0ada6922601f6;hb=13fa2b6f68da922283caf7210893cbd914b4cc21;hp=19ff89e34eec6b7aaec3d47b4a13aac9d6d70c1f;hpb=695884fb8acd9857e0e7120ccb2150e30f4b8fef;p=firefly-linux-kernel-4.4.55.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");