aeron: Fix Clang Warnings

packet-aeron.c:652:18: warning: Array access (from variable 'addr_data') results in a null pointer dereference [core.NullDereference]
packet-aeron.c:658:17: warning: Array access (from variable 'addr_data') results in a null pointer dereference [core.NullDereference]
This commit is contained in:
Alexis La Goutte 2022-07-30 10:36:36 +00:00 committed by A Wireshark GitLab Utility
parent 727dc92dd2
commit 6b35ff22de
1 changed files with 2 additions and 2 deletions

View File

@ -649,13 +649,13 @@ static gboolean aeron_is_address_multicast(const address * addr)
switch (addr->type)
{
case AT_IPv4:
if ((addr_data[0] & 0xf0) == 0xe0)
if (addr_data && ((addr_data[0] & 0xf0) == 0xe0))
{
return (TRUE);
}
break;
case AT_IPv6:
if (addr_data[0] == 0xff)
if (addr_data && (addr_data[0] == 0xff))
{
return (TRUE);
}