aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-coap.c
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2022-11-25 19:04:09 +0000
committerJoão Valverde <j@v6e.pt>2022-12-03 01:54:52 +0000
commit32f88ad22cf28efc6679d13ded6df99c72c3ea8c (patch)
tree084cb4ce3d1ed016def1d99d2748150dc3a644db /epan/dissectors/packet-coap.c
parent3311b341064403b9098d0db51d2732a271ffbbeb (diff)
wmem: Remove strbuf max size parameter
This parameter was introduced as a safeguard for bugs that generate an unbounded string but its utility for that purpose is doubtful and the way it is being used creates problems with invalid truncation of UTF-8 strings. Rename wmem_strbuf_sized_new() with a better name.
Diffstat (limited to 'epan/dissectors/packet-coap.c')
-rw-r--r--epan/dissectors/packet-coap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c
index ea49e6d079..364ba37a51 100644
--- a/epan/dissectors/packet-coap.c
+++ b/epan/dissectors/packet-coap.c
@@ -1323,8 +1323,8 @@ dissect_coap_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
coinfo->block_option = 0;
coinfo->block_number = DEFAULT_COAP_BLOCK_NUMBER;
coinfo->block_mflag = 0;
- coinfo->uri_str_strbuf = wmem_strbuf_sized_new(pinfo->pool, 0, 1024);
- coinfo->uri_query_strbuf = wmem_strbuf_sized_new(pinfo->pool, 0, 1024);
+ coinfo->uri_str_strbuf = wmem_strbuf_create(pinfo->pool);
+ coinfo->uri_query_strbuf = wmem_strbuf_create(pinfo->pool);
/* Allocate pointers and static elements of oscore_info_t, arrays are allocated only if object security option is found during option parsing */
coinfo->oscore_info = wmem_new0(pinfo->pool, oscore_info_t);
coinfo->object_security = FALSE;