From 043ce2c832c9fa2c95e102cad19cb6ae5dab5f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 20 Jan 2020 17:49:00 +0100 Subject: [PATCH] [SETUPLIB] Fix possible out-of-bound buffer if BootStore->Type is unknown/invalid --- base/setup/lib/utils/bldrsup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/setup/lib/utils/bldrsup.c b/base/setup/lib/utils/bldrsup.c index 554cfc3f56e..2e127924368 100644 --- a/base/setup/lib/utils/bldrsup.c +++ b/base/setup/lib/utils/bldrsup.c @@ -1016,7 +1016,7 @@ AddBootStoreEntry( } else { - DPRINT1("Loader type %d is currently unsupported!\n", NtosBootLoaders[BootStore->Type].Type); + DPRINT1("Loader type %d is currently unsupported!\n", BootStore->Type); return STATUS_NOT_SUPPORTED; } } @@ -1152,7 +1152,7 @@ QueryBootStoreOptions( // if (BootStore->Type >= BldrTypeMax || NtosBootLoaders[BootStore->Type].Type >= BldrTypeMax) if (BootStore->Type != FreeLdr && BootStore->Type != NtLdr) { - DPRINT1("Loader type %d is currently unsupported!\n", NtosBootLoaders[BootStore->Type].Type); + DPRINT1("Loader type %d is currently unsupported!\n", BootStore->Type); return STATUS_NOT_SUPPORTED; }