mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-27 01:29:27 +00:00
Make grub_zlib_decompress handle incomplete chunks.
Fixes squash4.
This commit is contained in:
1 parent
2984035e1a
commit
2e238b3708
5 files changed
+38
-14
No files matched your search
+12
-2
@@ -1104,7 +1104,12 @@ grub_btrfs_extent_read (struct grub_btrfs_data *data,
|
||||
- (grub_uint8_t *) data->extent),
|
||||
extoff, buf, csize)
|
||||
!= (grub_ssize_t) csize)
|
||||
return -1;
|
||||
{
|
||||
if (!grub_errno)
|
||||
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
|
||||
"premature end of compressed");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (data->extent->compression == GRUB_BTRFS_COMPRESSION_LZO)
|
||||
{
|
||||
@@ -1158,7 +1163,12 @@ grub_btrfs_extent_read (struct grub_btrfs_data *data,
|
||||
grub_free (tmp);
|
||||
|
||||
if (ret != (grub_ssize_t) csize)
|
||||
return -1;
|
||||
{
|
||||
if (!grub_errno)
|
||||
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
|
||||
"premature end of compressed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user