NetworkPkg/Ip6Dxe: Add NULL check for InterfaceId before dereference

In Ip6ProcessRouterAdvertise, IpSb->InterfaceId is dereferenced in
CopyMem to form a stateless address. Add a guard to ensure
IpSb->InterfaceId is not NULL before entering the block, preventing
a potential NULL pointer dereference.

Signed-off-by: Abuthahir M <abuthahirm@ami.com>
This commit is contained in:
abuthahirm 2026-04-30 16:59:22 +05:30 committed by mergify[bot]
parent d21677e0bc
commit a589f6fe03

View file

@ -2277,6 +2277,7 @@ Ip6ProcessRouterAdvertise (
//
if ((PrefixList == NULL) &&
(PrefixOption.ValidLifetime != 0) &&
(IpSb->InterfaceId != NULL) &&
(PrefixOption.PrefixLength + IpSb->InterfaceIdLen * 8 == 128)
)
{