Cc: Ye Ting <ting...@intel.com> Cc: Wu Jiaxin <jiaxin...@intel.com> Cc: Wang Fan <fan.w...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan...@intel.com> --- NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c index f2239fd8c0..327b4cf1cf 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c @@ -2,7 +2,7 @@ Functions implementation related with DHCPv6 for UefiPxeBc Driver. (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR> - Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -2030,6 +2030,9 @@ PxeBcDhcp6CallBack ( SelectAd = &Private->OfferBuffer[Private->SelectIndex - 1].Dhcp6.Packet.Offer; *NewPacket = AllocateZeroPool (SelectAd->Size); ASSERT (*NewPacket != NULL); + if (*NewPacket == NULL) { + return EFI_ABORTED; + } CopyMem (*NewPacket, SelectAd, SelectAd->Size); } break; -- 2.13.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel