diff options
Diffstat (limited to 'meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch')
-rw-r--r-- | meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch b/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch new file mode 100644 index 0000000000..0529a27b16 --- /dev/null +++ b/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 73692710d50da1f421b0e6ddff784ca3135389b3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dandan Bi <dandan.bi@intel.com> | ||
3 | Date: Sat, 1 Apr 2017 10:31:14 +0800 | ||
4 | Subject: [PATCH] MdeModulePkg/UefiHiiLib:Fix incorrect comparison expression | ||
5 | |||
6 | Fix the incorrect comparison between pointer and constant zero character. | ||
7 | |||
8 | https://bugzilla.tianocore.org/show_bug.cgi?id=416 | ||
9 | |||
10 | V2: The pointer StringPtr points to a string returned | ||
11 | by ExtractConfig/ExportConfig, if it is NULL, function | ||
12 | InternalHiiIfrValueAction will return FALSE. So in | ||
13 | current usage model, the StringPtr can not be NULL before | ||
14 | using it, so we can add ASSERT here. | ||
15 | |||
16 | Cc: Eric Dong <eric.dong@intel.com> | ||
17 | Cc: Liming Gao <liming.gao@intel.com> | ||
18 | Contributed-under: TianoCore Contribution Agreement 1.0 | ||
19 | Signed-off-by: Dandan Bi <dandan.bi@intel.com> | ||
20 | Reviewed-by: Eric Dong <eric.dong@intel.com> | ||
21 | --- | ||
22 | Upstream-Status: Backport | ||
23 | |||
24 | MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 5 +++-- | ||
25 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
26 | |||
27 | diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c | ||
28 | index 8579501..46ca7bc 100644 | ||
29 | --- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c | ||
30 | +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c | ||
31 | @@ -2180,8 +2180,9 @@ InternalHiiIfrValueAction ( | ||
32 | } | ||
33 | |||
34 | StringPtr = ConfigAltResp; | ||
35 | - | ||
36 | - while (StringPtr != L'\0') { | ||
37 | + ASSERT (StringPtr != NULL); | ||
38 | + | ||
39 | + while (*StringPtr != L'\0') { | ||
40 | // | ||
41 | // 1. Find <ConfigHdr> GUID=...&NAME=...&PATH=... | ||
42 | // | ||
43 | -- | ||
44 | 1.9.1 | ||
45 | |||