aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-01-29 18:51:00 -0500
committerMichael Mann <mmann78@netscape.net>2017-01-30 02:25:45 +0000
commitf789c91a5ebbbefba51aa3da983fe836ebc860d6 (patch)
treece4a066bc1d1e8fe4a3bfc1f49e171d8aeda33d2 /epan/tvbuff.c
parent9365fd3d3a4cdac07d70bd77f7a42f3260b33b5e (diff)
Have format_text_wsp use wmem allocated memory.
format_text_wsp is fed into by tvb_format_text_wsp and tvb_format_stringzpad_wsp so those functions need to add a wmem allocated parameter as well. Most of the changes came from tvb_format_text_wsp and tvb_format_stringzpad_wsp being changed more so than format_text_wsp. Change-Id: I52214ca107016f0e96371a9a8430aa89336f91d7 Reviewed-on: https://code.wireshark.org/review/19851 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r--epan/tvbuff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index 2d5408ab23..2d95e173f8 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -2190,7 +2190,7 @@ tvb_format_text(tvbuff_t *tvb, const gint offset, const gint size)
* Format the data in the tvb from offset for length ...
*/
gchar *
-tvb_format_text_wsp(tvbuff_t *tvb, const gint offset, const gint size)
+tvb_format_text_wsp(wmem_allocator_t* allocator, tvbuff_t *tvb, const gint offset, const gint size)
{
const guint8 *ptr;
gint len;
@@ -2198,7 +2198,7 @@ tvb_format_text_wsp(tvbuff_t *tvb, const gint offset, const gint size)
len = (size > 0) ? size : 0;
ptr = ensure_contiguous(tvb, offset, size);
- return format_text_wsp(ptr, len);
+ return format_text_wsp(allocator, ptr, len);
}
/*
@@ -2225,7 +2225,7 @@ tvb_format_stringzpad(tvbuff_t *tvb, const gint offset, const gint size)
* the null padding characters as "\000".
*/
gchar *
-tvb_format_stringzpad_wsp(tvbuff_t *tvb, const gint offset, const gint size)
+tvb_format_stringzpad_wsp(wmem_allocator_t* allocator, tvbuff_t *tvb, const gint offset, const gint size)
{
const guint8 *ptr, *p;
gint len;
@@ -2236,7 +2236,7 @@ tvb_format_stringzpad_wsp(tvbuff_t *tvb, const gint offset, const gint size)
ptr = ensure_contiguous(tvb, offset, size);
for (p = ptr, stringlen = 0; stringlen < len && *p != '\0'; p++, stringlen++)
;
- return format_text_wsp(ptr, stringlen);
+ return format_text_wsp(allocator, ptr, stringlen);
}
/* Unicode REPLACEMENT CHARACTER */