* grub-core/loader/xnu_resume.c (grub_xnu_resume): Reject empty images.
This commit is contained in:
parent
526d3d25e2
commit
954f7bf5ec
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2013-10-28 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/loader/xnu_resume.c (grub_xnu_resume): Reject empty images.
|
||||
|
||||
2013-10-28 Francesco Lavra <francescolavra.fl@gmail.com>
|
||||
|
||||
* grub-core/lib/fdt.c: Fix miscellaneous bugs.
|
||||
|
|
|
@ -83,6 +83,13 @@ grub_xnu_resume (char *imagename)
|
|||
"encrypted images aren't supported yet");
|
||||
}
|
||||
|
||||
if (hibhead.image_size == 0)
|
||||
{
|
||||
grub_file_close (file);
|
||||
return grub_error (GRUB_ERR_BAD_OS,
|
||||
"hibernate image is empty");
|
||||
}
|
||||
|
||||
codedest = hibhead.launchcode_target_page;
|
||||
codedest *= GRUB_XNU_PAGESIZE;
|
||||
codesize = hibhead.launchcode_numpages;
|
||||
|
|
Loading…
Reference in a new issue