From ac31518c8c8af043d157b294d99177b86f0bccd7 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 16 May 2013 23:00:29 +0200 Subject: dissector: igmp: Fix another erroneous null pointer check We need to break if we get NULL from pkt_pull() but the actual check was inverted. This was discovered by the coverity scanner and missed in commit b76adfd1 ("dissector: igmp: Fix erroneous null pointer check"). Signed-off-by: Tobias Klauser --- proto_igmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto_igmp.c b/proto_igmp.c index 6869fa6..f071f6c 100644 --- a/proto_igmp.c +++ b/proto_igmp.c @@ -435,7 +435,7 @@ static void dissect_igmp_v3_membership_report(struct pkt_buff *pkt) while (n--) { src_addr = (uint32_t *) pkt_pull(pkt, sizeof(*src_addr)); - if (src_addr != NULL) + if (src_addr == NULL) break; inet_ntop(AF_INET, src_addr, addr, sizeof(addr)); tprintf(", %s", addr); -- cgit v1.2.3-54-g00ecf