From 798523f1c5c8e2357410063098f0eb892b1156d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Go=C5=82a=C5=9B?= Date: Tue, 16 Jul 2024 12:28:15 +0200 Subject: [PATCH] SecureBootConfigImpl.c: Add missing allocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filip Go¿a¿ --- .../SecureBootConfigDxe/SecureBootConfigImpl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c index 17a332fa68..2062baf171 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c @@ -2613,7 +2613,13 @@ UpdateDeletePage ( goto ON_EXIT; } - CertificateInfoStr = AllocateZeroPool (100); + CertificateInfoStr = AllocateZeroPool (CertificateInfoStrSize); + if (CertificateInfoStr == NULL) { + Status = EFI_OUT_OF_RESOURCES; + goto ON_EXIT; + } + + CertificateInfoStr8 = AllocateZeroPool (CertificateInfoStrSizeHalf); if (CertificateInfoStr == NULL) { Status = EFI_OUT_OF_RESOURCES; goto ON_EXIT;