diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-12-09 22:38:42 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-12-09 22:38:42 +0000 |
commit | babc735c3a59bc947dd17f95601495b8c95fd786 (patch) | |
tree | b89bbda1bee415edbc2225a3f485f1369239237a /epan/dissectors/packet-q932-ros.c | |
parent | 79fa0d0a3fa8ebb91fac92fda1274957fc55bcd4 (diff) |
Reject the packet if data is NULL. For now, leave the DISSECTOR_ASSERT(rose_ctx_tmp) since get_rose_ctx() also checks the signature, which might be invalid even if data is not NULL.
svn path=/trunk/; revision=53896
Diffstat (limited to 'epan/dissectors/packet-q932-ros.c')
-rw-r--r-- | epan/dissectors/packet-q932-ros.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-q932-ros.c b/epan/dissectors/packet-q932-ros.c index 01ea7bf308..02751e9df8 100644 --- a/epan/dissectors/packet-q932-ros.c +++ b/epan/dissectors/packet-q932-ros.c @@ -104,7 +104,7 @@ static expert_field ei_ros_undecoded = EI_INIT; /* Preferences */ /* Subdissectors */ -static dissector_handle_t data_handle = NULL; +static dissector_handle_t data_handle = NULL; /* Gloabl variables */ static rose_ctx_t *rose_ctx_tmp; @@ -684,6 +684,9 @@ static int dissect_ROS_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree /*--- dissect_q932_ros -----------------------------------------------------*/ static int dissect_q932_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { + /* Reject the packet if data is NULL */ + if (data == NULL) + return 0; rose_ctx_tmp = get_rose_ctx(data); DISSECTOR_ASSERT(rose_ctx_tmp); return dissect_ROS_PDU(tvb, pinfo, tree, NULL); @@ -795,7 +798,7 @@ void proto_register_q932_ros(void) { "InvokeId_present", HFILL }}, /*--- End of included file: packet-q932-ros-hfarr.c ---*/ -#line 80 "../../asn1/q932-ros/packet-q932-ros-template.c" +#line 83 "../../asn1/q932-ros/packet-q932-ros-template.c" }; /* List of subtrees */ @@ -815,7 +818,7 @@ void proto_register_q932_ros(void) { &ett_q932_ros_InvokeId, /*--- End of included file: packet-q932-ros-ettarr.c ---*/ -#line 85 "../../asn1/q932-ros/packet-q932-ros-template.c" +#line 88 "../../asn1/q932-ros/packet-q932-ros-template.c" }; static ei_register_info ei[] = { |