Wireshark mailing list archives
Re: how to handle dissecting length encoded strings
From: Chris Maynard <chris.maynard () gtech com>
Date: Mon, 14 Mar 2011 16:01:54 +0000 (UTC)
Fulko Hew <fulko.hew@...> writes:
Comments anyone?
How about this patch?: Index: epan/dissectors/packet-agentx.c =================================================================== --- epan/dissectors/packet-agentx.c (revision 36188) +++ epan/dissectors/packet-agentx.c (working copy) @@ -308,8 +308,7 @@ if (n_oct >= 1024) THROW(ReportedBoundsError); if (n_oct > 0) - tvb_get_nstringz(tvb, offset + 4, n_oct, context); - context[n_oct]='\0'; + tvb_get_nstringz0(tvb, offset + 4, n_oct, context); proto_tree_add_uint(tree, hf_ostring_len, tvb, offset, 4, n_oct); proto_tree_add_string(tree, hf_ostring, tvb, offset + 4, n_oct, context) ; - Chris ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- how to handle dissecting length encoded strings Fulko Hew (Mar 14)
- Re: how to handle dissecting length encoded strings Chris Maynard (Mar 14)
- Re: how to handle dissecting length encoded strings Chris Maynard (Mar 14)
- Re: how to handle dissecting length encoded strings Fulko Hew (Mar 14)
- Re: how to handle dissecting length encoded strings Chris Maynard (Mar 14)
- Re: how to handle dissecting length encoded strings Jakub Zawadzki (Mar 14)
- Re: how to handle dissecting length encoded strings Chris Maynard (Mar 14)
- Re: how to handle dissecting length encoded strings Chris Maynard (Mar 14)