Merge remote-tracking branch 'asoc/topic/component' into asoc-next
[cascardo/linux.git] / lib / decompress_inflate.c
index 19ff89e..d619b28 100644 (file)
@@ -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");