Please extend copyright, with this update Reviewed-by: Chasel Chiu <chasel.c...@intel.com>
> -----Original Message----- > From: Zhang, Shenglei > Sent: Monday, September 2, 2019 8:35 PM > To: devel@edk2.groups.io > Cc: Kubacki, Michael A <michael.a.kuba...@intel.com>; Chiu, Chasel > <chasel.c...@intel.com>; Desimone, Nathaniel L > <nathaniel.l.desim...@intel.com>; Gao, Liming <liming....@intel.com> > Subject: [PATCH] MinPlatformPkg/TestPointCheckLib: Add check for pointer > Variable > > Add check for pointer Variable to ensure it is not NULL when used. > > Cc: Michael Kubacki <michael.a.kuba...@intel.com> > Cc: Chasel Chiu <chasel.c...@intel.com> > Cc: Nate DeSimone <nathaniel.l.desim...@intel.com> > Cc: Liming Gao <liming....@intel.com> > Signed-off-by: Shenglei Zhang <shenglei.zh...@intel.com> > --- > .../Test/Library/TestPointCheckLib/DxeCheckUefiSecureBoot.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git > a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckU > efiSecureBoot.c > b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckU > efiSecureBoot.c > index b53a09ab..f5125ede 100644 > --- > a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckU > efiSecureBoot.c > +++ > b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckU > efiSecureBoot.c > @@ -52,6 +52,9 @@ TestPointCheckUefiSecureBoot ( > ReturnStatus = EFI_SUCCESS; > for (Index = 0; Index < > sizeof(mUefiSecureBootVariable)/sizeof(mUefiSecureBootVariable[0]); > Index++) { > Status = GetVariable2 (mUefiSecureBootVariable[Index].Name, > mUefiSecureBootVariable[Index].Guid, &Variable, &Size); > + if(Variable == NULL) { > + return EFI_NOT_FOUND; > + } > if (EFI_ERROR(Status)) { > DEBUG ((DEBUG_ERROR, "Variable - %S not found\n", > mUefiSecureBootVariable[Index].Name)); > ReturnStatus = Status; > @@ -69,6 +72,9 @@ TestPointCheckUefiSecureBoot ( > > for (Index = 0; Index < > sizeof(mUefiSecureBootModeVariable)/sizeof(mUefiSecureBootModeVariabl > e[0]); Index++) { > Status = GetVariable2 (mUefiSecureBootModeVariable[Index].Name, > mUefiSecureBootModeVariable[Index].Guid, &Variable, &Size); > + if(Variable == NULL) { > + return EFI_NOT_FOUND; > + } > if (EFI_ERROR(Status)) { > DEBUG ((DEBUG_ERROR, "Variable - %S not found\n", > mUefiSecureBootModeVariable[Index].Name)); > ReturnStatus = Status; > -- > 2.18.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46678): https://edk2.groups.io/g/devel/message/46678 Mute This Topic: https://groups.io/mt/33110622/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-