Make grub_zlib_decompress handle incomplete chunks.
Fixes squash4.
This commit is contained in:
parent
2984035e1a
commit
2e238b3708
5 changed files with 38 additions and 14 deletions
|
@ -1303,12 +1303,6 @@ grub_zlib_decompress (char *inbuf, grub_size_t insize, grub_off_t off,
|
|||
ret = grub_gzio_read_real (gzio, off, outbuf, outsize);
|
||||
grub_free (gzio);
|
||||
|
||||
if (!grub_errno && ret != (grub_ssize_t) outsize)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "premature end of compressed");
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
/* FIXME: Check Adler. */
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue