From d8547a8f20aa795c59c710ff5704d40e029753f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Tue, 3 Nov 2020 01:28:14 +0100 Subject: [PATCH] [FREELDR] In LoadReactOSSetup(), verify that our BootType is really ReactOSSetup. --- boot/freeldr/freeldr/ntldr/setupldr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/boot/freeldr/freeldr/ntldr/setupldr.c b/boot/freeldr/freeldr/ntldr/setupldr.c index 1443a7dd635..ec1aafe0f7b 100644 --- a/boot/freeldr/freeldr/ntldr/setupldr.c +++ b/boot/freeldr/freeldr/ntldr/setupldr.c @@ -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)