From 29715ccc8f78d9a2f791437f49d6718615795c15 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 19 Feb 2013 23:17:07 +0000 Subject: How can I get a new tvbuff that starts at an offset within a given tvbuff and runs to the end of the tvbuff? Let me count the ways.... Replace a bunch of different ways of doing that (some incorrect, in that they're not properly handling tvbuffs where the captured and reported lengths are different) with tvb_new_subset_remaining(). svn path=/trunk/; revision=47751 --- epan/dissectors/packet-gssapi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'epan/dissectors/packet-gssapi.c') diff --git a/epan/dissectors/packet-gssapi.c b/epan/dissectors/packet-gssapi.c index eb14cdd968..5354c35741 100644 --- a/epan/dissectors/packet-gssapi.c +++ b/epan/dissectors/packet-gssapi.c @@ -314,7 +314,7 @@ dissect_gssapi_work(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if ((tvb_length_remaining(gss_tvb, start_offset)>16) && ((tvb_memeql(gss_tvb, start_offset, "\x01\x00\x00\x00", 4) == 0))) { return_offset = call_dissector(ntlmssp_payload_handle, - tvb_new_subset(gss_tvb, start_offset, -1, -1), + tvb_new_subset_remaining(gss_tvb, start_offset), pinfo, subtree); pinfo->gssapi_data_encrypted = TRUE; goto done; @@ -323,12 +323,12 @@ dissect_gssapi_work(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ((tvb_memeql(gss_tvb, start_offset, "\x01\x00\x00\x00", 4) == 0))) { if( is_verifier ) { return_offset = call_dissector(ntlmssp_verf_handle, - tvb_new_subset(gss_tvb, start_offset, -1, -1), + tvb_new_subset_remaining(gss_tvb, start_offset), pinfo, subtree); } else if( pinfo->gssapi_encrypted_tvb ) { return_offset = call_dissector(ntlmssp_data_only_handle, - tvb_new_subset(pinfo->gssapi_encrypted_tvb, 0, -1, -1), + tvb_new_subset_remaining(pinfo->gssapi_encrypted_tvb, 0), pinfo, subtree); pinfo->gssapi_data_encrypted = TRUE; } -- cgit v1.2.3