X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=lib%2Fdecompress_inflate.c;h=fc686c7a0a0da688dd9dee52156dc7f6c0c380ab;hb=5740afdb68abadc473fd5392df733558a58c1254;hp=68dfce59c1b80be510544c0effc3f87669527b8f;hpb=7fa9742bf7f918293c0b3ffd84167fccbdd42765;p=karo-tx-linux.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);