mirror of https://github.com/acidanthera/audk.git
NetworkPkg: Add assert for buffer pointer from DHCP driver.
The PxeBcDhcp4CallBack() is provided for DHCP driver to invoke packet check during DHCP process, the DHCP driver should make sure Packet and NewPacket has meaningful value. This patch adds assert for this. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
parent
2fad330f6b
commit
9d1c98e699
|
@ -1210,6 +1210,8 @@ PxeBcDhcp4CallBack (
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
ASSERT (Packet != NULL);
|
||||
|
||||
Private = (PXEBC_PRIVATE_DATA *) Context;
|
||||
Mode = Private->PxeBc.Mode;
|
||||
Callback = Private->PxeBcCallback;
|
||||
|
@ -1305,6 +1307,8 @@ PxeBcDhcp4CallBack (
|
|||
break;
|
||||
|
||||
case Dhcp4SelectOffer:
|
||||
ASSERT (NewPacket != NULL);
|
||||
|
||||
//
|
||||
// Select offer by the default policy or by order, and record the SelectIndex
|
||||
// and SelectProxyType.
|
||||
|
|
Loading…
Reference in New Issue