diff options
Diffstat (limited to 'epan/dissectors/packet-tacacs.c')
-rw-r--r-- | epan/dissectors/packet-tacacs.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-tacacs.c b/epan/dissectors/packet-tacacs.c index 29339e7f6e..2ea2c8105b 100644 --- a/epan/dissectors/packet-tacacs.c +++ b/epan/dissectors/packet-tacacs.c @@ -396,14 +396,15 @@ static void dissect_tacplus_args_list( tvbuff_t *tvb, proto_tree *tree, int data_off, int len_off, int arg_cnt ) { int i; - guint8 buff[257]; + int len; + guint8 *value; for(i=0;i<arg_cnt;i++){ - int len=tvb_get_guint8(tvb,len_off+i); + len=tvb_get_guint8(tvb,len_off+i); proto_tree_add_uint_format(tree, hf_tacplus_arg_length, tvb, len_off+i, 1, len, "Arg[%d] length: %d", i, len); - tvb_get_nstringz0(tvb, data_off, len+1, buff); - proto_tree_add_string_format(tree, hf_tacplus_arg_value, tvb, data_off, len, buff, - "Arg[%d] value: %s", i, buff); + value=tvb_get_string_enc(wmem_packet_scope(), tvb, data_off, len, ENC_ASCII|ENC_NA); + proto_tree_add_string_format(tree, hf_tacplus_arg_value, tvb, data_off, len, value, + "Arg[%d] value: %s", i, value); data_off+=len; } } |