NetworkPkg: Code logic optimization for DnsDxe and HttpDxe driver
Revise some errors which may lead NULL pointer be dereferenced: * DnsDhcp.c: Paralist may be used without any initialized * DnsHeader and RcvString may be null but be dereferenced * HttpDriver.c: revise an if judgment * HttpImpl.c: add a judgment to avoid null 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@17923 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -766,6 +766,10 @@ HttpResponseWorker (
|
||||
HTTP_TOKEN_WRAP *ValueInItem;
|
||||
UINTN HdrLen;
|
||||
|
||||
if (Wrap == NULL || Wrap->HttpInstance == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
HttpInstance = Wrap->HttpInstance;
|
||||
Token = Wrap->HttpToken;
|
||||
|
||||
|
Reference in New Issue
Block a user