1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #20660 from maribu/sys/net/grnc/fix-compilation-with-gcc-14-1-0

sys/net/grnc: fix NULL ptr dereferencing
This commit is contained in:
Martine Lenders 2024-05-09 15:00:53 +00:00 committed by GitHub
commit 3927a4fd17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -244,7 +244,8 @@ static gnrc_pktsnip_t *_build_ext_opts(gnrc_netif_t *netif,
ext_opts = rdnsso;
}
#endif /* CONFIG_GNRC_IPV6_NIB_DNS */
if (gnrc_netif_is_6ln(netif)) {
if (gnrc_netif_is_6lr(netif)) {
assert(abr != NULL);
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C)
uint16_t ltime_min;
gnrc_pktsnip_t *abro;
@ -293,7 +294,7 @@ static gnrc_pktsnip_t *_build_ext_opts(gnrc_netif_t *netif,
ext_opts = abro;
#endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C */
}
else {
else if (!gnrc_netif_is_6ln(netif)) {
(void)abr;
while ((pfx = _nib_offl_iter(pfx))) {
if ((pfx->mode & _PL) && (_nib_onl_get_if(pfx->next_hop) == id)) {