add one more check into savedefault.
This commit is contained in:
parent
dc1c0a6ccf
commit
13aaba9380
2 changed files with 9 additions and 2 deletions
|
@ -1,7 +1,13 @@
|
|||
2001-02-03 OKUJI Yoshinori <okuji@gnu.org>
|
||||
|
||||
* stage2/builtins.c (savedefault_func)
|
||||
[!SUPPORT_DISKLESS && !GRUB_UTIL]: Check if the version
|
||||
contained in the buffer matches to current one as well.
|
||||
|
||||
2001-02-02 OKUJI Yoshinori <okuji@gnu.org>
|
||||
|
||||
* stage2/builtins.c (savedefault_func)
|
||||
[!SUPPORT_DISKLESS && !GRUB_UTIL]: Check if the stage2 is
|
||||
[!SUPPORT_DISKLESS && !GRUB_UTIL]: Check if the stage2 id is
|
||||
STAGE2_ID_STAGE2. Suggested by Jochen Hoenicke.
|
||||
|
||||
* stage2/stage2.c (cmain): If DEFAULT_ENTRY is out of entries,
|
||||
|
|
|
@ -3081,7 +3081,8 @@ savedefault_func (char *arg, int flags)
|
|||
}
|
||||
|
||||
/* Sanity check. */
|
||||
if (buffer[STAGE2_STAGE2_ID] != STAGE2_ID_STAGE2)
|
||||
if (buffer[STAGE2_STAGE2_ID] != STAGE2_ID_STAGE2
|
||||
|| *((short *) (buffer + STAGE2_VER_MAJ_OFFS)) != COMPAT_VERSION)
|
||||
{
|
||||
errnum = ERR_BAD_VERSION;
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue