From 47d744b59da83744623bea39c006eb7e2ec02de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Sun, 3 Feb 2008 15:38:20 +0000 Subject: More rewrite of prohibited APIs (sprintf, strcpy, strcat). svn path=/trunk/; revision=24258 --- tap-iostat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tap-iostat.c') diff --git a/tap-iostat.c b/tap-iostat.c index 5833a46bf5..225af8254d 100644 --- a/tap-iostat.c +++ b/tap-iostat.c @@ -663,8 +663,7 @@ iostat_init(const char *optarg, void* userdata _U_) if(pos==str){ register_io_tap(io, i, NULL); } else if(pos==NULL) { - tmp=g_malloc(strlen(str)+1); - strcpy(tmp,str); + tmp=g_strdup(str); register_io_tap(io, i, tmp); } else { tmp=g_malloc((pos-str)+1); -- cgit v1.2.3