summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Ruytenberg <bjorn@bjornweb.nl>2017-05-19 19:03:29 +0200
committerMichael Mann <mmann78@netscape.net>2017-05-19 19:02:43 +0000
commitb2923e93133e21f18799124eff01156088980456 (patch)
tree3798464094557d54f199308f5fac9a7159325b2d
parentb83e74c3dd333dec914765bc17ad82e9b8031963 (diff)
downloadwireshark-b2923e93133e21f18799124eff01156088980456.tar.gz
msnip: Verify pinfo->dst is a valid IPv4 address
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1678 Bug: 13725 Change-Id: Ib61733200658b4cca0bb0f45e5445b0ed3c12ab0 Reviewed-on: https://code.wireshark.org/review/21712 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/packet-msnip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-msnip.c b/epan/dissectors/packet-msnip.c
index 3dcd8b5285..bd0d231726 100644
--- a/epan/dissectors/packet-msnip.c
+++ b/epan/dissectors/packet-msnip.c
@@ -217,8 +217,8 @@ dissect_msnip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
guint32 dst = g_htonl(MC_ALL_IGMPV3_ROUTERS);
/* Shouldn't be destined for us */
- if (memcmp(pinfo->dst.data, &dst, 4))
- return 0;
+ if ((pinfo->dst.type != AT_IPv4) || memcmp(pinfo->dst.data, &dst, 4))
+ return 0;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MSNIP");
col_clear(pinfo->cinfo, COL_INFO);