summaryrefslogtreecommitdiff
path: root/epan/ftypes/ftype-pcre.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-05-10 16:37:44 -0400
committerMichael Mann <mmann78@netscape.net>2016-05-10 22:49:25 +0000
commit4d3df66af44b563a1c6d6fe03fcdf09f93877dba (patch)
treea9d9927c9c20bfdc0b304f439a024b34fd55eac3 /epan/ftypes/ftype-pcre.c
parent1dccd1ee072722fbe6d5e1a9d726a7e87d191f76 (diff)
downloadwireshark-4d3df66af44b563a1c6d6fe03fcdf09f93877dba.tar.gz
Give FvalueToStringRepr a length parameter.
This allows the conversion of a few straggler strcpy calls in ftype library. Also provides a more accurate size value instead of the many hard coded values the ftypes were using. Change-Id: Ia6273980432e16ad3a6233816a6054d9fed5d2a4 Reviewed-on: https://code.wireshark.org/review/15344 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/ftypes/ftype-pcre.c')
-rw-r--r--epan/ftypes/ftype-pcre.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/ftypes/ftype-pcre.c b/epan/ftypes/ftype-pcre.c
index e0ed16ab84..efde63ef9c 100644
--- a/epan/ftypes/ftype-pcre.c
+++ b/epan/ftypes/ftype-pcre.c
@@ -125,10 +125,10 @@ gregex_repr_len(fvalue_t *fv, ftrepr_t rtype, int field_display _U_)
}
static void
-gregex_to_repr(fvalue_t *fv, ftrepr_t rtype, int field_display _U_, char *buf)
+gregex_to_repr(fvalue_t *fv, ftrepr_t rtype, int field_display _U_, char *buf, unsigned int size)
{
g_assert(rtype == FTREPR_DFILTER);
- strcpy(buf, g_regex_get_pattern(fv->value.re));
+ g_strlcpy(buf, g_regex_get_pattern(fv->value.re), size);
}
/* BEHOLD - value contains the string representation of the regular expression,