REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1456
For the NET_LIST_FOR_EACH & NET_LIST_FOR_EACH_SAFE, "Entry" should be checked whether it's NULL or not instead of using the pointer directly. Besides, NET_LIST_FOR_EACH_SAFE is defined to iterate through the double linked list in delete-safe way. It's unnecessary to use this macro if list entries won't be deleted. Cc: Wu Hao A <hao.a...@intel.com> Cc: Gao Liming <liming....@intel.com> Cc: Ye Ting <ting...@intel.com> Cc: Fu Siyuan <siyuan...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin <jiaxin...@intel.com> Jiaxin Wu (2): MdeModulePkg/NetLib.h: Fix the possible NULL pointer dereference issue. MdeModulePkg/Dhcp4Dxe: Use NET_LIST_FOR_EACH instead of NET_LIST_FOR_EACH_SAFE. MdeModulePkg/Include/Library/NetLib.h | 6 +++--- MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) -- 2.17.1.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel