From: Jiaxin Wu <jiaxin.wu@intel.com>
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
Date: Wed, 16 Aug 2017 14:19:17 +0800 [thread overview]
Message-ID: <1502864357-18332-1-git-send-email-jiaxin.wu@intel.com> (raw)
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
next reply other threads:[~2017-08-16 6:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 6:19 Jiaxin Wu [this message]
2017-08-16 6:33 ` [Patch] NetworkPkg/Ip6Dxe: Fix the bug when checking the DataSize Fu, Siyuan
2017-08-16 7:02 ` Ye, Ting
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1502864357-18332-1-git-send-email-jiaxin.wu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox