public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Fix the possible NULL pointer dereference issue.
@ 2019-01-15  1:26 Jiaxin Wu
  2019-01-15  1:26 ` [PATCH v1 1/2] MdeModulePkg/NetLib.h: " Jiaxin Wu
  2019-01-15  1:26 ` [PATCH v1 2/2] MdeModulePkg/Dhcp4Dxe: Use NET_LIST_FOR_EACH instead of NET_LIST_FOR_EACH_SAFE Jiaxin Wu
  0 siblings, 2 replies; 5+ messages in thread
From: Jiaxin Wu @ 2019-01-15  1:26 UTC (permalink / raw)
  To: edk2-devel; +Cc: Wu Hao A, Gao Liming, Ye Ting, Fu Siyuan, Wu Jiaxin

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.wu@intel.com>
Cc: Gao Liming <liming.gao@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-16  8:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-15  1:26 [PATCH v1 0/2] Fix the possible NULL pointer dereference issue Jiaxin Wu
2019-01-15  1:26 ` [PATCH v1 1/2] MdeModulePkg/NetLib.h: " Jiaxin Wu
2019-01-15 10:29   ` Laszlo Ersek
2019-01-16  8:23     ` Wu, Jiaxin
2019-01-15  1:26 ` [PATCH v1 2/2] MdeModulePkg/Dhcp4Dxe: Use NET_LIST_FOR_EACH instead of NET_LIST_FOR_EACH_SAFE Jiaxin Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox