summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-05-12 13:52:12 +0200
committerTobias Klauser <tklauser@distanz.ch>2013-05-12 13:52:12 +0200
commitb76adfd12a21676abb82e9f1ebe134510d9a4766 (patch)
treef096abe714209b3d61dbe65acc1179f97b582d86
parent06d60f51149ef960110431b228828c7bbc84e74c (diff)
dissector: igmp: Fix 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. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--proto_igmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto_igmp.c b/proto_igmp.c
index 30fb527..6869fa6 100644
--- a/proto_igmp.c
+++ b/proto_igmp.c
@@ -373,7 +373,7 @@ static void dissect_igmp_v3_membership_query(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);