summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-09 16:32:15 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-09 16:32:15 +0000
commitedce8204d13a47f4e510466cd69b4b25c4a8641a (patch)
treeedb35a8550a2d22d81984a2db05af06aa7fe20e2
parent494d32ad2a0df16847dcec21bfb91cf7859992a5 (diff)
downloadwireshark-edce8204d13a47f4e510466cd69b4b25c4a8641a.tar.gz
Reject the packet if data is NULL.
svn path=/trunk/; revision=53883
-rw-r--r--epan/dissectors/packet-mpls-y1711.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/dissectors/packet-mpls-y1711.c b/epan/dissectors/packet-mpls-y1711.c
index 73cc880f21..e747ac8a7f 100644
--- a/epan/dissectors/packet-mpls-y1711.c
+++ b/epan/dissectors/packet-mpls-y1711.c
@@ -116,7 +116,7 @@ static const value_string y1711_defect_type_vals[] = {
static int
dissect_mpls_y1711(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
- struct mplsinfo *mplsinfo = (struct mplsinfo *)data;
+ struct mplsinfo *mplsinfo;
int offset = 0;
proto_item *ti;
proto_tree *mpls_y1711_tree;
@@ -129,6 +129,11 @@ dissect_mpls_y1711(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00 };
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ mplsinfo = (struct mplsinfo *)data;
+
functype = tvb_get_guint8(tvb, offset);
col_append_fstr(pinfo->cinfo, COL_INFO, " (Y.1711: %s)",
(functype == 0x01) ? "CV" :