X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=lib%2Fdecompress_inflate.c;h=fc686c7a0a0da688dd9dee52156dc7f6c0c380ab;hb=195d3ce2cc9a8ec69827f6369c41b269345b9988;hp=68dfce59c1b80be510544c0effc3f87669527b8f;hpb=9134d02bc0af4a8747d448d1f811ec5f8eb96df6;p=cascardo%2Flinux.git diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c index 68dfce59c1b8..fc686c7a0a0d 100644 --- a/lib/decompress_inflate.c +++ b/lib/decompress_inflate.c @@ -27,6 +27,11 @@ #define GZIP_IOBUF_SIZE (16*1024) +static int nofill(void *buffer, unsigned int len) +{ + return -1; +} + /* Included from initramfs et al code */ STATIC int INIT gunzip(unsigned char *buf, int len, int(*fill)(void*, unsigned int), @@ -76,6 +81,9 @@ STATIC int INIT gunzip(unsigned char *buf, int len, goto gunzip_nomem4; } + if (!fill) + fill = nofill; + if (len == 0) len = fill(zbuf, GZIP_IOBUF_SIZE);