summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/HttpUtilitiesDxe
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2015-09-08 02:01:05 +0000
committerjiaxinwu <jiaxinwu@Edk2>2015-09-08 02:01:05 +0000
commit2ba88dc554f074946189ec178b82ae2a9974247a (patch)
tree02a5e52ffbdf81c7b1ec23ca4eb0f5e926a792b6 /NetworkPkg/HttpUtilitiesDxe
parentfb9819f13dc1e3b13d65840742a4f9ad9e393e7b (diff)
downloadedk2-2ba88dc554f074946189ec178b82ae2a9974247a.tar.gz
edk2-2ba88dc554f074946189ec178b82ae2a9974247a.tar.bz2
edk2-2ba88dc554f074946189ec178b82ae2a9974247a.zip
NetworkPkg: Fix suspicious dereference of pointer 'FieldCount'
This patch is used to fix suspicious dereference of pointer 'FieldCount' before NULL check. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18409 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg/HttpUtilitiesDxe')
-rw-r--r--NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c2
1 files changed, 1 insertions, 1 deletions
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;