add one more check into savedefault.

This commit is contained in:
okuji committed 2001-02-03 04:21:21 +00:00
1 parent dc1c0a6ccf
commit 13aaba9380
2 files changed
+9 -2

No files matched your search

+2 -1
View File
@@ -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;