Fix for bug 1133:

add a test for (length > 0) in the dissector (dissect_xot_pdu), to avoid to
allocate a new tvb when the XOT decoded length is null. 

svn path=/trunk/; revision=19365
This commit is contained in:
Jaap Keuter 2006-09-29 19:39:40 +00:00
parent 49a3e2a6e5
commit 8fd898635b
1 changed files with 5 additions and 2 deletions

View File

@ -105,8 +105,11 @@ static void dissect_xot_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
length = tvb_length_remaining(tvb, offset + 4);
if (length > plen)
length = plen;
next_tvb = tvb_new_subset(tvb, offset + 4, length, plen);
call_dissector(x25_handle, next_tvb, pinfo, tree);
if (plen > 0)
{
next_tvb = tvb_new_subset(tvb, offset + 4, length, plen);
call_dissector(x25_handle, next_tvb, pinfo, tree);
}
}
static int dissect_xot(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)