aboutsummaryrefslogtreecommitdiffstats
path: root/tap-iostat.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-03-02 21:12:24 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-03-02 21:12:24 +0000
commitf6026eb9787123f7550ed004e6120904089e1470 (patch)
tree43eadc8767f7ae7a9480c825ea94dcd9d43255c8 /tap-iostat.c
parent280d579242704529d6c7ae1aac524189c6ff64d8 (diff)
Rewrote to use g_strlcpy and g_strlcat.
svn path=/trunk/; revision=24531
Diffstat (limited to 'tap-iostat.c')
-rw-r--r--tap-iostat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tap-iostat.c b/tap-iostat.c
index 225af8254d..456b5cdf5b 100644
--- a/tap-iostat.c
+++ b/tap-iostat.c
@@ -37,6 +37,7 @@
#include "epan/packet_info.h"
#include <epan/tap.h>
#include <epan/stat_cmd_args.h>
+#include <epan/strutil.h>
#include "register.h"
@@ -667,8 +668,7 @@ iostat_init(const char *optarg, void* userdata _U_)
register_io_tap(io, i, tmp);
} else {
tmp=g_malloc((pos-str)+1);
- strncpy(tmp,str,(pos-str));
- tmp[pos-str]=0;
+ g_strlcpy(tmp,str,(pos-str)+1);
register_io_tap(io, i, tmp);
}
str=pos+1;