From a79fbf039768a3da0402d492c77b64c7f76c2345 Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Sun, 2 Mar 2014 09:58:49 -0500 Subject: [PATCH] Don't pass an invalid length to proto_item_set_len Fixes bug #9818. Change-Id: I4fb4cf2b5b31ed6efc55a48df67f2ec4949d47c3 Reviewed-on: https://code.wireshark.org/review/442 Reviewed-by: Evan Huus --- epan/dissectors/packet-giop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epan/dissectors/packet-giop.c b/epan/dissectors/packet-giop.c index 544b20a69d..5bdc4ab14e 100644 --- a/epan/dissectors/packet-giop.c +++ b/epan/dissectors/packet-giop.c @@ -3926,7 +3926,8 @@ static void decode_ServiceContextList(tvbuff_t *tvb, packet_info *pinfo, proto_t stream_is_be, boundary, &encapsulation_is_be , &encapsulation_boundary); - proto_item_set_len(tf_st1, 8 + context_data_len); + if ((int)(8 + context_data_len) >= 8) + proto_item_set_len(tf_st1, 8 + context_data_len); sub_tree1 = proto_item_add_subtree (tf_st1, ett_giop_scl_st1); if (context_data_len == 0)