ROS: Harden ROS dissection
Make sure that on a OID search an actual OID is available to search for. Bug: 13637 Change-Id: I36f84cce5506f003d2a30a17f8671d5e22070612 Reviewed-on: https://code.wireshark.org/review/21280 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
951ac6c230
commit
c70d2ec806
|
@ -145,7 +145,7 @@ ros_try_string(const char *oid, tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
|
|||
proto_item *item=NULL;
|
||||
proto_tree *ros_tree=NULL;
|
||||
|
||||
if((session != NULL) && ((rinfo = (ros_info_t*)wmem_map_lookup(protocol_table, oid)) != NULL)) {
|
||||
if((session != NULL) && (oid != NULL) && ((rinfo = (ros_info_t*)wmem_map_lookup(protocol_table, oid)) != NULL)) {
|
||||
|
||||
if(tree){
|
||||
item = proto_tree_add_item(tree, *(rinfo->proto), tvb, 0, -1, ENC_NA);
|
||||
|
|
|
@ -199,7 +199,7 @@ ros_try_string(const char *oid, tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
|
|||
proto_item *item=NULL;
|
||||
proto_tree *ros_tree=NULL;
|
||||
|
||||
if((session != NULL) && ((rinfo = (ros_info_t*)wmem_map_lookup(protocol_table, oid)) != NULL)) {
|
||||
if((session != NULL) && (oid != NULL) && ((rinfo = (ros_info_t*)wmem_map_lookup(protocol_table, oid)) != NULL)) {
|
||||
|
||||
if(tree){
|
||||
item = proto_tree_add_item(tree, *(rinfo->proto), tvb, 0, -1, ENC_NA);
|
||||
|
|
Loading…
Reference in New Issue