diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2015-09-08 06:01:04 +0000 |
---|---|---|
committer | hwu1225 <hwu1225@Edk2> | 2015-09-08 06:01:04 +0000 |
commit | bcb9fdb5baeb9d9df6ad391129e95027d0f645cc (patch) | |
tree | 23951d46ff7796b645183dcf99d575eddc54b391 | |
parent | 79a12b0b18bca465a1fbd2c0023710e2ea99a142 (diff) | |
download | edk2-platforms-bcb9fdb5baeb9d9df6ad391129e95027d0f645cc.tar.xz |
NetworkPkg: Fix suspicious dereference of pointer 'FieldCount'
This patch is used to fix suspicious dereference of pointer 'FieldCount'
before NULL check.
(Sync patch r18409 from main trunk.)
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/branches/UDK2015@18410 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c | 2 |
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;
|