This patch appears to have caused OVMF to stop booting. I hit an
assert now in BDS after attempting to set the BootOrder variable
fails. An ideas of how to fix this?

On 2015-10-14 19:57:55, Star Zeng wrote:
> to variable with wildcard name.

The purpose of the first line of the commit message is to be the
subject of the patch. So, it is best to not overflow it to the next
line.

For example, the 'git log --oneline' is useful for skimming the
patches, but it only shows the first line of the commit message.

-Jordan

> VarCheckLib has zeroed property for variable with wildcard name
> and is waiting for property set. The code should return NULL
> when no property set to variable with wildcard name, but not
> return the zeroed property that will impact the functionality of
> SetVariableCheck.
> 
> The issue does not appear with VarCheckUefiLib linked as the library
> just has the expected property set.
> 
> Cc: Jiewen Yao <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Star Zeng <[email protected]>
> ---
>  MdeModulePkg/Library/VarCheckLib/VarCheckLib.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/MdeModulePkg/Library/VarCheckLib/VarCheckLib.c 
> b/MdeModulePkg/Library/VarCheckLib/VarCheckLib.c
> index cf00154..3d1f8f6 100644
> --- a/MdeModulePkg/Library/VarCheckLib/VarCheckLib.c
> +++ b/MdeModulePkg/Library/VarCheckLib/VarCheckLib.c
> @@ -141,11 +141,19 @@ VariablePropertyGetWithWildcardName (
>              VarCheckInternalIsHexaDecimalDigitCharacter 
> (VariableName[NameLength + 1]) &&
>              VarCheckInternalIsHexaDecimalDigitCharacter 
> (VariableName[NameLength + 2]) &&
>              VarCheckInternalIsHexaDecimalDigitCharacter 
> (VariableName[NameLength + 3])) {
> -          return &mVarCheckVariableWithWildcardName[Index].VariableProperty;
> +          if 
> (mVarCheckVariableWithWildcardName[Index].VariableProperty.Revision != 
> VAR_CHECK_VARIABLE_PROPERTY_REVISION) {
> +            return NULL;
> +          } else {
> +            return 
> &mVarCheckVariableWithWildcardName[Index].VariableProperty;
> +          }
>          }
>        }
>        if (StrCmp (mVarCheckVariableWithWildcardName[Index].Name, 
> VariableName) == 0) {
> -        return  &mVarCheckVariableWithWildcardName[Index].VariableProperty;
> +        if 
> (mVarCheckVariableWithWildcardName[Index].VariableProperty.Revision != 
> VAR_CHECK_VARIABLE_PROPERTY_REVISION) {
> +          return NULL;
> +        } else {
> +          return  &mVarCheckVariableWithWildcardName[Index].VariableProperty;
> +        }
>        }
>      }
>    }
> -- 
> 1.9.5.msysgit.0
> 
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to