aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff.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/tvbuff.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/tvbuff.c')
-rw-r--r--epan/tvbuff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index 99d37ed68b..4f0bfdab82 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -3033,7 +3033,7 @@ tvb_get_apn_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset,
* the upper 2 bits of the length don't indicate that it's a
* pointer or an extended label (RFC 2673).
*/
- str = wmem_strbuf_sized_new(scope, length + 1, 0);
+ str = wmem_strbuf_new_sized(scope, length + 1);
if (length > 0) {
const guint8 *ptr;