aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/file-rbm.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2019-03-22 09:28:31 -0700
committerDario Lombardo <lomato@gmail.com>2019-03-22 18:22:49 +0000
commit108507e50467c0ac4742d6a652ad1ed86f9fb527 (patch)
tree85a76fdb050b785733ffa889114d31527847bda1 /epan/dissectors/file-rbm.c
parent696d1fe6b9aa0c5d2e70a3a6fc26af02750d9a3a (diff)
Rbm: Be more strict about unknown object types.
Stop dissection if we encounter an unknown object type. Update .editorconfig while we're here. Bug: 15612 Change-Id: I91c0868c376c2b50645af997e0bf84e5c90a512b Reviewed-on: https://code.wireshark.org/review/32523 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'epan/dissectors/file-rbm.c')
-rw-r--r--epan/dissectors/file-rbm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/file-rbm.c b/epan/dissectors/file-rbm.c
index c369133544..28ee6684b3 100644
--- a/epan/dissectors/file-rbm.c
+++ b/epan/dissectors/file-rbm.c
@@ -409,8 +409,8 @@ static void dissect_rbm_object(tvbuff_t* tvb, packet_info* pinfo, proto_tree* pt
{
guint8 subtype = tvb_get_guint8(tvb, *offset);
proto_tree* tree;
- gchar* type_local = NULL;
- gchar* value_local = NULL;
+ gchar* type_local = "Unknown";
+ gchar* value_local = "Unknown";
gint offset_start = *offset;
tree = proto_tree_add_subtree(ptree, tvb, *offset, 0, ett_variable, NULL, "");
@@ -494,6 +494,7 @@ static void dissect_rbm_object(tvbuff_t* tvb, packet_info* pinfo, proto_tree* pt
default:
expert_add_info_format(pinfo, tree, &ei_rbm_invalid,
"Object type 0x%x is invalid", subtype);
+ *offset += tvb_reported_length_remaining(tvb, *offset);
}
proto_item_set_len(tree, *offset - offset_start);