[FREELDR] In LoadReactOSSetup(), verify that our BootType is really ReactOSSetup.

This commit is contained in:
Hermès Bélusca-Maïto 2020-11-03 01:28:14 +01:00
parent 3033580c1a
commit d8547a8f20
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -212,6 +212,19 @@ LoadReactOSSetup(
NULL
};
/* Retrieve the (mandatory) boot type */
ArgValue = GetArgumentValue(Argc, Argv, "BootType");
if (!ArgValue || !*ArgValue)
{
ERR("No 'BootType' value, aborting!\n");
return EINVAL;
}
if (_stricmp(ArgValue, "ReactOSSetup") != 0)
{
ERR("Unknown 'BootType' value '%s', aborting!\n", ArgValue);
return EINVAL;
}
/* Retrieve the (mandatory) system partition */
SystemPartition = GetArgumentValue(Argc, Argv, "SystemPartition");
if (!SystemPartition || !*SystemPartition)