public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2] MdeModulePkg/SetupBrowserDxe: Fix IsZeroGuid() ASSERT.
@ 2020-02-21  1:56 Nickle Wang
  2020-02-21  2:16 ` Dandan Bi
  0 siblings, 1 reply; 2+ messages in thread
From: Nickle Wang @ 2020-02-21  1:56 UTC (permalink / raw)
  To: devel, nickle.wang; +Cc: dandan.bi

>From the function description of GetIfrBinaryData(), FormSetGuid can be
NULL. However, FormSetGuid is passed to IsZeroGuid(). This causes exception
when FormSetGuid is NULL.

Signed-off-by: Nickle Wang <nickle.wang@hpe.com>
---
 MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index 288f1c3197..82067b541c 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -2,6 +2,7 @@
 Entry and initialization module for the browser.
 
 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -5844,7 +5845,7 @@ GetIfrBinaryData (
           //
           // Try to compare against formset GUID
           //
-          if (IsZeroGuid (FormSetGuid) ||
+          if (IsZeroGuid (ComparingGuid) ||
               CompareGuid (ComparingGuid, (EFI_GUID *)(OpCodeData + sizeof (EFI_IFR_OP_HEADER)))) {
             break;
           }
-- 
2.20.1.windows.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] MdeModulePkg/SetupBrowserDxe: Fix IsZeroGuid() ASSERT.
  2020-02-21  1:56 [PATCH v2] MdeModulePkg/SetupBrowserDxe: Fix IsZeroGuid() ASSERT Nickle Wang
@ 2020-02-21  2:16 ` Dandan Bi
  0 siblings, 0 replies; 2+ messages in thread
From: Dandan Bi @ 2020-02-21  2:16 UTC (permalink / raw)
  To: Nickle Wang, devel@edk2.groups.io

Reviewed-by: Dandan Bi <dandan.bi@intel.com>


Thanks,
Dandan
> -----Original Message-----
> From: Nickle Wang [mailto:nickle.wang@hpe.com]
> Sent: Friday, February 21, 2020 9:57 AM
> To: devel@edk2.groups.io; nickle.wang@hpe.com
> Cc: Bi, Dandan <dandan.bi@intel.com>
> Subject: [PATCH v2] MdeModulePkg/SetupBrowserDxe: Fix IsZeroGuid() ASSERT.
> 
> From the function description of GetIfrBinaryData(), FormSetGuid can be NULL.
> However, FormSetGuid is passed to IsZeroGuid(). This causes exception when
> FormSetGuid is NULL.
> 
> Signed-off-by: Nickle Wang <nickle.wang@hpe.com>
> ---
>  MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
> b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
> index 288f1c3197..82067b541c 100644
> --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
> +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
> @@ -2,6 +2,7 @@
>  Entry and initialization module for the browser.
> 
>  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
> +(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -5844,7 +5845,7 @@ GetIfrBinaryData (
>            //
>            // Try to compare against formset GUID
>            //
> -          if (IsZeroGuid (FormSetGuid) ||
> +          if (IsZeroGuid (ComparingGuid) ||
>                CompareGuid (ComparingGuid, (EFI_GUID *)(OpCodeData + sizeof
> (EFI_IFR_OP_HEADER)))) {
>              break;
>            }
> --
> 2.20.1.windows.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-21  2:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-21  1:56 [PATCH v2] MdeModulePkg/SetupBrowserDxe: Fix IsZeroGuid() ASSERT Nickle Wang
2020-02-21  2:16 ` Dandan Bi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox