From 531dc03960058ebf72e593f3ae36d99db4d1af17 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Tue, 5 Sep 2023 21:59:41 +0200 Subject: [PATCH] Fix null pointer dereference in IGMP --- modules/pico_igmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/pico_igmp.c b/modules/pico_igmp.c index bf20ad78..ade4b5b3 100644 --- a/modules/pico_igmp.c +++ b/modules/pico_igmp.c @@ -367,6 +367,8 @@ static int pico_igmp_timer_is_running(struct igmp_timer *t) test.type = t->type; test.mcast_link = t->mcast_link; test.mcast_group = t->mcast_group; + if (!t->stack) + return 0; timer = pico_tree_findKey(&t->stack->IGMPTimers, &test); if (timer) return 1;