From fa849b3bb28985b022c11ff5b5a3c867563956e9 Mon Sep 17 00:00:00 2001 From: stig Date: Sun, 3 Feb 2008 15:38:20 +0000 Subject: More rewrite of prohibited APIs (sprintf, strcpy, strcat). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24258 f5534014-38df-0310-8fa8-9805f1628bb7 --- tap-bootpstat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tap-bootpstat.c') diff --git a/tap-bootpstat.c b/tap-bootpstat.c index 83d304091a..1f23e44101 100644 --- a/tap-bootpstat.c +++ b/tap-bootpstat.c @@ -152,8 +152,7 @@ dhcpstat_init(const char *optarg, void* userdata _U_) sp = g_malloc( sizeof(dhcpstat_t) ); sp->hash = g_hash_table_new( g_str_hash, g_str_equal); if(filter){ - sp->filter=g_malloc(strlen(filter)+1); - strcpy(sp->filter,filter); + sp->filter=g_strdup(filter); } else { sp->filter=NULL; } -- cgit v1.2.3