Blame SOURCES/0054-simple_file-fix-uninitialized-variable-unchecked-ret.patch
|
|
00e791 |
From c186bdddaa7b103aef9d4a164ac0a07499dba112 Mon Sep 17 00:00:00 2001
|
|
|
00e791 |
From: Peter Jones <pjones@redhat.com>
|
|
|
00e791 |
Date: Wed, 22 Jul 2020 23:55:44 -0400
|
|
|
00e791 |
Subject: [PATCH 54/62] simple_file: fix uninitialized variable/unchecked
|
|
|
00e791 |
return
|
|
|
00e791 |
|
|
|
00e791 |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
00e791 |
Upstream: pr#212
|
|
|
00e791 |
---
|
|
|
00e791 |
lib/simple_file.c | 6 +++---
|
|
|
00e791 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
00e791 |
|
|
|
00e791 |
diff --git a/lib/simple_file.c b/lib/simple_file.c
|
|
|
00e791 |
index 3bf92ed8e0f..6ad31b4dc04 100644
|
|
|
00e791 |
--- a/lib/simple_file.c
|
|
|
00e791 |
+++ b/lib/simple_file.c
|
|
|
00e791 |
@@ -403,10 +403,10 @@ simple_file_selector(EFI_HANDLE * im, CHAR16 ** title, CHAR16 * name,
|
|
|
00e791 |
filter = L"";
|
|
|
00e791 |
if (!*im) {
|
|
|
00e791 |
EFI_HANDLE h;
|
|
|
00e791 |
- CHAR16 *volname;
|
|
|
00e791 |
+ CHAR16 *volname = NULL;
|
|
|
00e791 |
|
|
|
00e791 |
- simple_volume_selector(title, &volname, &h);
|
|
|
00e791 |
- if (!volname)
|
|
|
00e791 |
+ efi_status = simple_volume_selector(title, &volname, &h);
|
|
|
00e791 |
+ if (EFI_ERROR(efi_status) || !volname)
|
|
|
00e791 |
return;
|
|
|
00e791 |
FreePool(volname);
|
|
|
00e791 |
*im = h;
|
|
|
00e791 |
--
|
|
|
00e791 |
2.26.2
|
|
|
00e791 |
|