From 2ba88dc554f074946189ec178b82ae2a9974247a Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Tue, 8 Sep 2015 02:01:05 +0000 Subject: NetworkPkg: Fix suspicious dereference of pointer 'FieldCount' This patch is used to fix suspicious dereference of pointer 'FieldCount' before NULL check. Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu Reviewed-by: Fu Siyuan git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18409 6f19259b-4bc3-4df7-8a09-765794883524 --- NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'NetworkPkg/HttpUtilitiesDxe') diff --git a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c index 8c29f20adf..a83c9633fc 100644 --- a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c +++ b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c @@ -307,7 +307,6 @@ HttpUtilitiesParse ( Status = EFI_SUCCESS; TempHttpMessage = NULL; - *FieldCount = 0; Token = NULL; NextToken = NULL; FieldName = NULL; @@ -328,6 +327,7 @@ HttpUtilitiesParse ( // // Get header number // + *FieldCount = 0; Token = TempHttpMessage; while (TRUE) { FieldName = NULL; -- cgit v1.2.3