mirror of https://github.com/acidanthera/audk.git
MdeModulePkg: Code logic optimization for Ip4Dxe driver
Move null check before set value to address to avoid null address dereferenced. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: fanwang2 <fan.wang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17924 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3fd7bd08f4
commit
b1d4218a51
|
@ -874,6 +874,10 @@ Ip4FormExtractConfig (
|
|||
EFI_STRING FormResult;
|
||||
UINTN Size;
|
||||
UINTN BufferSize;
|
||||
|
||||
if (Progress == NULL || Results == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
IfrFormNvData = NULL;
|
||||
|
@ -887,10 +891,6 @@ Ip4FormExtractConfig (
|
|||
BufferSize = sizeof (IP4_CONFIG2_IFR_NVDATA);
|
||||
*Progress = Request;
|
||||
|
||||
if (Progress == NULL || Results == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
//
|
||||
// Check Request data in <ConfigHdr>.
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue