File: 0001-OvmfPkg-QemuKernelLoaderFsDxe-fix-allocation-failure.patch

package info (click to toggle)
edk2 2025.02-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 271,992 kB
  • sloc: ansic: 2,110,013; asm: 263,832; perl: 227,730; python: 149,823; sh: 34,967; cpp: 21,813; makefile: 3,285; xml: 806; pascal: 721; lisp: 35; ruby: 16; sed: 6; tcl: 4
file content (31 lines) | stat: -rw-r--r-- 1,075 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 1026e2da2673959626aedfb57abe3ae41b18ff5b Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Wed, 16 Apr 2025 10:31:56 +0200
Subject: [PATCH] OvmfPkg/QemuKernelLoaderFsDxe: fix allocation failure check

Origin: https://github.com/tianocore/edk2/pull/10971
Bug: https://github.com/tianocore/edk2/issues/10881
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1101152
Last-Updated: 2025-04-16

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c
index df6364cc31..646a9a5f15 100644
--- a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c
+++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c
@@ -1019,7 +1019,7 @@ QemuKernelFetchBlob (
   }
 
   Blob = AllocatePool (sizeof (*Blob));
-  if (Blob->Data == NULL) {
+  if (Blob == NULL) {
     return EFI_OUT_OF_RESOURCES;
   }
 
-- 
2.49.0