diff options
author | João Valverde <j@v6e.pt> | 2022-11-25 18:32:41 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2022-11-30 15:55:54 +0000 |
commit | 729ea56b46b1c9faca58108b26723d1ddc986a1b (patch) | |
tree | 862e68ac169b10e78e54b2d937651456e8c7f313 /epan/dissectors/packet-etch.c | |
parent | 93814ef7407611b55acc6f077539293ad0a44013 (diff) |
wmem: Remove wmem_strbuf_new_label()
Only dissectors are using this function and there is no use case,
as far as I know, that requires its use. Any limitation of length
is imposed transparently by the UI backend.
This function is problematic because it is not Unicode aware and
will truncate a string on an arbitrary byte boundary for multibyte
strings.
Replace its use with a normal strbuf without a length limite and
remove the function because it is not useful and the ITEM_LABEL_LENGTH
parameter does not belong in wmem anyway.
Diffstat (limited to 'epan/dissectors/packet-etch.c')
-rw-r--r-- | epan/dissectors/packet-etch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-etch.c b/epan/dissectors/packet-etch.c index ff5fb9d69b..a651fdab09 100644 --- a/epan/dissectors/packet-etch.c +++ b/epan/dissectors/packet-etch.c @@ -513,7 +513,7 @@ read_number(unsigned int *offset, tvbuff_t *tvb, proto_tree *etch_tree, const gchar *symbol = NULL; guint32 hash = 0; - gbl_symbol_buffer = wmem_strbuf_new_label(wmem_packet_scope()); /* no symbol found yet */ + gbl_symbol_buffer = wmem_strbuf_create(wmem_packet_scope()); /* no symbol found yet */ if (byteLength == 4) { hash = tvb_get_ntohl(tvb, *offset); symbol = try_val_to_str_ext(hash, gbl_symbols_vs_ext); @@ -667,7 +667,7 @@ get_column_info(tvbuff_t *tvb) int my_offset = 0; /* We've a full PDU: 8 bytes + pdu_packetlen bytes */ - result_buf = wmem_strbuf_new_label(wmem_packet_scope()); + result_buf = wmem_strbuf_create(wmem_packet_scope()); my_offset += (4 + 4 + 1); /* skip Magic, Length, Version */ |