diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-03-01 17:23:39 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-03-01 17:23:39 +0000 |
commit | b091b8d26cf290d1f4fdf41820f01e87bb6b7d6d (patch) | |
tree | 75b52bc6b03f8df488b8acbe97063df9d6d8b02d /epan/dissectors/packet-cpfi.c | |
parent | 346d46b8d020d0b5bdd9757622cdec2625349a10 (diff) | |
download | wireshark-b091b8d26cf290d1f4fdf41820f01e87bb6b7d6d.tar.gz wireshark-b091b8d26cf290d1f4fdf41820f01e87bb6b7d6d.tar.bz2 wireshark-b091b8d26cf290d1f4fdf41820f01e87bb6b7d6d.zip |
Rewrote to use g_strlcpy and g_strlcat.
svn path=/trunk/; revision=24525
Diffstat (limited to 'epan/dissectors/packet-cpfi.c')
-rw-r--r-- | epan/dissectors/packet-cpfi.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 <epan/packet.h> #include <epan/prefs.h> +#include <epan/strutil.h> 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 |