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
This commit is contained in:
Jiaxin Wu 2015-09-08 02:01:05 +00:00 committed by jiaxinwu
parent fb9819f13d
commit 2ba88dc554
1 changed files with 1 additions and 1 deletions

View File

@ -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;