public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] NetworkPkg: Fix potentially uninitialized local variable
@ 2016-12-26  2:11 Jiaxin Wu
  2016-12-26  2:39 ` Ye, Ting
  2016-12-26  2:39 ` Fu, Siyuan
  0 siblings, 2 replies; 3+ messages in thread
From: Jiaxin Wu @ 2016-12-26  2:11 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ye Ting, Fu Siyuan, Wu Jiaxin

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
 NetworkPkg/HttpDxe/HttpProto.c                  | 2 ++
 NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c
index 199d575..2e784de 100644
--- a/NetworkPkg/HttpDxe/HttpProto.c
+++ b/NetworkPkg/HttpDxe/HttpProto.c
@@ -1473,10 +1473,12 @@ HttpTransmitTcp (
   UINTN                         BufferSize;
   NET_FRAGMENT                  TempFragment;
 
   Status                = EFI_SUCCESS;
   Buffer                = NULL;
+  TempFragment.Len      = 0;
+  TempFragment.Bulk     = NULL;
 
   //
   // Need to encrypt data.
   //
   if (HttpInstance->UseHttps) {
diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
index e81e961..5f04503 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
@@ -1716,11 +1716,11 @@ TlsAuthConfigAccessCallback (
           return EFI_OUT_OF_RESOURCES;
         }
       }
       if (QuestionId == KEY_TLS_AUTH_CONFIG_CLIENT_CERT) {
         LabelId = TLS_AUTH_CONFIG_FORMID3_FORM;
-      } else if (QuestionId == KEY_TLS_AUTH_CONFIG_SERVER_CA) {
+      } else {
         LabelId = TLS_AUTH_CONFIG_FORMID4_FORM;
       }
 
       //
       // Refresh selected file.
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch] NetworkPkg: Fix potentially uninitialized local variable
  2016-12-26  2:11 [Patch] NetworkPkg: Fix potentially uninitialized local variable Jiaxin Wu
@ 2016-12-26  2:39 ` Ye, Ting
  2016-12-26  2:39 ` Fu, Siyuan
  1 sibling, 0 replies; 3+ messages in thread
From: Ye, Ting @ 2016-12-26  2:39 UTC (permalink / raw)
  To: Wu, Jiaxin, edk2-devel@lists.01.org; +Cc: Fu, Siyuan

Reviewed-by: Ye Ting <ting.ye@intel.com> 

-----Original Message-----
From: Wu, Jiaxin 
Sent: Monday, December 26, 2016 10:11 AM
To: edk2-devel@lists.01.org
Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch] NetworkPkg: Fix potentially uninitialized local variable

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
 NetworkPkg/HttpDxe/HttpProto.c                  | 2 ++
 NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 199d575..2e784de 100644
--- a/NetworkPkg/HttpDxe/HttpProto.c
+++ b/NetworkPkg/HttpDxe/HttpProto.c
@@ -1473,10 +1473,12 @@ HttpTransmitTcp (
   UINTN                         BufferSize;
   NET_FRAGMENT                  TempFragment;
 
   Status                = EFI_SUCCESS;
   Buffer                = NULL;
+  TempFragment.Len      = 0;
+  TempFragment.Bulk     = NULL;
 
   //
   // Need to encrypt data.
   //
   if (HttpInstance->UseHttps) {
diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
index e81e961..5f04503 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
@@ -1716,11 +1716,11 @@ TlsAuthConfigAccessCallback (
           return EFI_OUT_OF_RESOURCES;
         }
       }
       if (QuestionId == KEY_TLS_AUTH_CONFIG_CLIENT_CERT) {
         LabelId = TLS_AUTH_CONFIG_FORMID3_FORM;
-      } else if (QuestionId == KEY_TLS_AUTH_CONFIG_SERVER_CA) {
+      } else {
         LabelId = TLS_AUTH_CONFIG_FORMID4_FORM;
       }
 
       //
       // Refresh selected file.
--
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch] NetworkPkg: Fix potentially uninitialized local variable
  2016-12-26  2:11 [Patch] NetworkPkg: Fix potentially uninitialized local variable Jiaxin Wu
  2016-12-26  2:39 ` Ye, Ting
@ 2016-12-26  2:39 ` Fu, Siyuan
  1 sibling, 0 replies; 3+ messages in thread
From: Fu, Siyuan @ 2016-12-26  2:39 UTC (permalink / raw)
  To: Wu, Jiaxin, edk2-devel@lists.01.org; +Cc: Ye, Ting

Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

-----Original Message-----
From: Wu, Jiaxin 
Sent: 2016年12月26日 10:11
To: edk2-devel@lists.01.org
Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch] NetworkPkg: Fix potentially uninitialized local variable

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
 NetworkPkg/HttpDxe/HttpProto.c                  | 2 ++
 NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 199d575..2e784de 100644
--- a/NetworkPkg/HttpDxe/HttpProto.c
+++ b/NetworkPkg/HttpDxe/HttpProto.c
@@ -1473,10 +1473,12 @@ HttpTransmitTcp (
   UINTN                         BufferSize;
   NET_FRAGMENT                  TempFragment;
 
   Status                = EFI_SUCCESS;
   Buffer                = NULL;
+  TempFragment.Len      = 0;
+  TempFragment.Bulk     = NULL;
 
   //
   // Need to encrypt data.
   //
   if (HttpInstance->UseHttps) {
diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
index e81e961..5f04503 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
@@ -1716,11 +1716,11 @@ TlsAuthConfigAccessCallback (
           return EFI_OUT_OF_RESOURCES;
         }
       }
       if (QuestionId == KEY_TLS_AUTH_CONFIG_CLIENT_CERT) {
         LabelId = TLS_AUTH_CONFIG_FORMID3_FORM;
-      } else if (QuestionId == KEY_TLS_AUTH_CONFIG_SERVER_CA) {
+      } else {
         LabelId = TLS_AUTH_CONFIG_FORMID4_FORM;
       }
 
       //
       // Refresh selected file.
--
1.9.5.msysgit.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-26  2:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-26  2:11 [Patch] NetworkPkg: Fix potentially uninitialized local variable Jiaxin Wu
2016-12-26  2:39 ` Ye, Ting
2016-12-26  2:39 ` Fu, Siyuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox