2009-06-17 Felix Zielcke <fzielcke@z-51.de>
* loader/i386/linux.c (grub_cmd_linux): Set grub_error if the file can't be found. * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
This commit is contained in:
parent
cf24ed9e2a
commit
05b129e0d3
3 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2009-06-17 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
|
||||||
|
file can't be found.
|
||||||
|
* loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
|
||||||
|
|
||||||
2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
|
2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Fix newline handling
|
Fix newline handling
|
||||||
|
|
|
@ -600,7 +600,10 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||||
|
|
||||||
file = grub_file_open (argv[0]);
|
file = grub_file_open (argv[0]);
|
||||||
if (! file)
|
if (! file)
|
||||||
|
{
|
||||||
|
grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh))
|
if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh))
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,7 +69,10 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||||
|
|
||||||
file = grub_file_open (argv[0]);
|
file = grub_file_open (argv[0]);
|
||||||
if (! file)
|
if (! file)
|
||||||
|
{
|
||||||
|
grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
if ((grub_size_t) grub_file_size (file) > grub_os_area_size)
|
if ((grub_size_t) grub_file_size (file) > grub_os_area_size)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue