aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2021-03-23 16:41:54 +0100
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-03-25 09:38:10 +0000
commitea929d6401351916e0abca7429979eee9c47d3f2 (patch)
tree522492a802e608e8049fa5a3586477053002bce0 /epan/ftypes
parente6df13076281a704e9dd1aa8c2afe3e7dce015e3 (diff)
wsutils: add local implementation of g_memdup2.
g_memdup() was deprecated and replaced with g_memdup2() in GLib 2.68, we provide our own copy of g_memdup2() for older GLib versions.
Diffstat (limited to 'epan/ftypes')
-rw-r--r--epan/ftypes/ftype-protocol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/ftypes/ftype-protocol.c b/epan/ftypes/ftype-protocol.c
index b3dc5328a5..a2b46c9423 100644
--- a/epan/ftypes/ftype-protocol.c
+++ b/epan/ftypes/ftype-protocol.c
@@ -12,6 +12,7 @@
#include <epan/strutil.h>
#include <epan/to_str-int.h>
#include <string.h>
+#include <wsutil/glib-compat.h>
#include <epan/exceptions.h>
@@ -58,7 +59,7 @@ val_from_string(fvalue_t *fv, const char *s, gchar **err_msg _U_)
/* Make a tvbuff from the string. We can drop the
* terminating NUL. */
- private_data = (guint8 *)g_memdup(s, (guint)strlen(s));
+ private_data = (guint8 *)g_memdup2(s, (guint)strlen(s));
new_tvb = tvb_new_real_data(private_data,
(guint)strlen(s), (gint)strlen(s));