* [Patch] NetworkPkg/Ip6Dxe: Fix the bug when checking the DataSize
@ 2017-08-16 6:19 Jiaxin Wu
2017-08-16 6:33 ` Fu, Siyuan
2017-08-16 7:02 ` Ye, Ting
0 siblings, 2 replies; 3+ messages in thread
From: Jiaxin Wu @ 2017-08-16 6:19 UTC (permalink / raw)
To: edk2-devel; +Cc: Ye Ting, Fu Siyuan, Wu Jiaxin
During setting the DnsServer, the DataSize check is incorrect.
This patch is to fix the issue.
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/Ip6Dxe/Ip6ConfigImpl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
index 61418e2..f4b9374 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
@@ -1464,11 +1464,11 @@ Ip6ConfigSetDnsServer (
OldDns = NULL;
NewDns = NULL;
Item = NULL;
Tmp = NULL;
- if ((DataSize == 0) && (DataSize % sizeof (EFI_IPv6_ADDRESS) != 0)) {
+ if ((DataSize != 0) && (DataSize % sizeof (EFI_IPv6_ADDRESS) != 0)) {
return EFI_BAD_BUFFER_SIZE;
}
if (Instance->Policy != Ip6ConfigPolicyManual) {
return EFI_WRITE_PROTECTED;
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch] NetworkPkg/Ip6Dxe: Fix the bug when checking the DataSize
2017-08-16 6:19 [Patch] NetworkPkg/Ip6Dxe: Fix the bug when checking the DataSize Jiaxin Wu
@ 2017-08-16 6:33 ` Fu, Siyuan
2017-08-16 7:02 ` Ye, Ting
1 sibling, 0 replies; 3+ messages in thread
From: Fu, Siyuan @ 2017-08-16 6:33 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: Wednesday, August 16, 2017 2:19 PM
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/Ip6Dxe: Fix the bug when checking the DataSize
During setting the DnsServer, the DataSize check is incorrect.
This patch is to fix the issue.
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/Ip6Dxe/Ip6ConfigImpl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
index 61418e2..f4b9374 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
@@ -1464,11 +1464,11 @@ Ip6ConfigSetDnsServer (
OldDns = NULL;
NewDns = NULL;
Item = NULL;
Tmp = NULL;
- if ((DataSize == 0) && (DataSize % sizeof (EFI_IPv6_ADDRESS) != 0)) {
+ if ((DataSize != 0) && (DataSize % sizeof (EFI_IPv6_ADDRESS) != 0)) {
return EFI_BAD_BUFFER_SIZE;
}
if (Instance->Policy != Ip6ConfigPolicyManual) {
return EFI_WRITE_PROTECTED;
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch] NetworkPkg/Ip6Dxe: Fix the bug when checking the DataSize
2017-08-16 6:19 [Patch] NetworkPkg/Ip6Dxe: Fix the bug when checking the DataSize Jiaxin Wu
2017-08-16 6:33 ` Fu, Siyuan
@ 2017-08-16 7:02 ` Ye, Ting
1 sibling, 0 replies; 3+ messages in thread
From: Ye, Ting @ 2017-08-16 7:02 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: Wednesday, August 16, 2017 2:19 PM
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/Ip6Dxe: Fix the bug when checking the DataSize
During setting the DnsServer, the DataSize check is incorrect.
This patch is to fix the issue.
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/Ip6Dxe/Ip6ConfigImpl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
index 61418e2..f4b9374 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
@@ -1464,11 +1464,11 @@ Ip6ConfigSetDnsServer (
OldDns = NULL;
NewDns = NULL;
Item = NULL;
Tmp = NULL;
- if ((DataSize == 0) && (DataSize % sizeof (EFI_IPv6_ADDRESS) != 0)) {
+ if ((DataSize != 0) && (DataSize % sizeof (EFI_IPv6_ADDRESS) != 0)) {
return EFI_BAD_BUFFER_SIZE;
}
if (Instance->Policy != Ip6ConfigPolicyManual) {
return EFI_WRITE_PROTECTED;
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-16 6:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-16 6:19 [Patch] NetworkPkg/Ip6Dxe: Fix the bug when checking the DataSize Jiaxin Wu
2017-08-16 6:33 ` Fu, Siyuan
2017-08-16 7:02 ` Ye, Ting
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox