From 9d08ef3f634c4e26659c6a9dd4c3f1580715aeef Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Tue, 10 May 2016 20:46:37 -0400 Subject: Remove strcpy from wmem_strbuf.c This removes all strcpy calls from Wireshark provided code (only ones remaining are in lemon.c) Change-Id: I7a467fc3e10cc94c97196ecea3277a5375bc14b7 Reviewed-on: https://code.wireshark.org/review/15347 Reviewed-by: Evan Huus Reviewed-by: Michael Mann --- epan/wmem/wmem_strbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'epan/wmem') diff --git a/epan/wmem/wmem_strbuf.c b/epan/wmem/wmem_strbuf.c index 0a0f1a5f56..571e98754b 100644 --- a/epan/wmem/wmem_strbuf.c +++ b/epan/wmem/wmem_strbuf.c @@ -98,7 +98,7 @@ wmem_strbuf_new(wmem_allocator_t *allocator, const gchar *str) strbuf = wmem_strbuf_sized_new(allocator, alloc_len, 0); if (str && len > 0) { - strcpy(strbuf->str, str); + g_strlcpy(strbuf->str, str, alloc_len); strbuf->len = len; } -- cgit v1.2.3