From b091b8d26cf290d1f4fdf41820f01e87bb6b7d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Sat, 1 Mar 2008 17:23:39 +0000 Subject: Rewrote to use g_strlcpy and g_strlcat. svn path=/trunk/; revision=24525 --- epan/dissectors/packet-cpfi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-cpfi.c') diff --git a/epan/dissectors/packet-cpfi.c b/epan/dissectors/packet-cpfi.c index 562526ad2c..633ca6ac23 100644 --- a/epan/dissectors/packet-cpfi.c +++ b/epan/dissectors/packet-cpfi.c @@ -39,6 +39,7 @@ #include #include +#include void proto_reg_handoff_cpfi(void); @@ -182,7 +183,7 @@ dissect_cpfi_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tda = (word1 & CPFI_DEST_MASK) >> CPFI_DEST_SHIFT; if ( tda >= FIRST_TIO_CARD_ADDRESS ) { - strncpy(src_str, " CPFI", sizeof(src_str)); + g_strlcpy(src_str, " CPFI", sizeof(src_str)); src = 0; /* Make it smallest */ } else @@ -204,7 +205,7 @@ dissect_cpfi_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tda = (word1 & CPFI_SOURCE_MASK) >> CPFI_SOURCE_SHIFT; if ( tda >= FIRST_TIO_CARD_ADDRESS ) { - strncpy(dst_str, " CPFI", sizeof(dst_str)); + g_strlcpy(dst_str, " CPFI", sizeof(dst_str)); dst = 0; /* Make it smallest */ } else -- cgit v1.2.3