X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=lib%2Fdecompress_inflate.c;h=fc686c7a0a0da688dd9dee52156dc7f6c0c380ab;hb=bca516bfcfeb545e00bad3b6ca075d91c9c0b365;hp=68dfce59c1b80be510544c0effc3f87669527b8f;hpb=9e5cf0ca2e9b65110ae5f094d7f0f7165cd1bbbb;p=safe%2Fjmp%2Flinux-2.6 diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c index 68dfce5..fc686c7 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);