mirror of https://github.com/acidanthera/audk.git
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> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
parent
d75b8ac278
commit
aa0f2bf7cc
|
@ -1466,7 +1466,7 @@ Ip6ConfigSetDnsServer (
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue