mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-27 01:29:27 +00:00
add one more check into savedefault.
This commit is contained in:
1 parent
dc1c0a6ccf
commit
13aaba9380
2 files changed
+9
-2
No files matched your search
+2
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user