]> git.proxmox.com Git - mirror_edk2.git/commit - NetworkPkg/Include/Library/NetLib.h
MdeModulePkg/DxeNetLib: Add array range check in NetIp6IsNetEqual().
authorWang Fan <fan.wang@intel.com>
Thu, 11 Jan 2018 10:09:24 +0000 (18:09 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Fri, 12 Jan 2018 03:08:44 +0000 (11:08 +0800)
commite0e26f9c1ffa596f700101027b9346b10d78b191
tree4f067b5e97bf083d9acd6d38832893dfc76a303b
parent20737c2fe6895b2ce291c90596365e9d0ac467b0
MdeModulePkg/DxeNetLib: Add array range check in NetIp6IsNetEqual().

* The library API use array elements without any index range check, this
patch is to fix this issue to avoid null pointer reference.

V2
* Added an ASSERT check for the case PrefixLength equals to IP6_PREFIX_MAX.
* Synced some code descriptions to head file.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wang Fan <fan.wang@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
MdeModulePkg/Include/Library/NetLib.h
MdeModulePkg/Library/DxeNetLib/DxeNetLib.c