diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-09-21 15:38:12 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-09-21 15:38:12 +0000 |
commit | 1424f6142904ec9460f4524bc9ddbc2cfe822fc7 (patch) | |
tree | 1a18cb1664a8bbc2edf6c8aa5234d509dc55fe33 /epan/dissectors/packet-afs.c | |
parent | 186141598d0f7c044b8b228a5bbd1573cfd1edd1 (diff) |
remove some strcpy() with g_snprintf()
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15931 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-afs.c')
-rw-r--r-- | epan/dissectors/packet-afs.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/epan/dissectors/packet-afs.c b/epan/dissectors/packet-afs.c index 7396f68182..544bcf3d82 100644 --- a/epan/dissectors/packet-afs.c +++ b/epan/dissectors/packet-afs.c @@ -2632,9 +2632,10 @@ dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o } for (i=0; i<8; i++) { - char part[8]; + char *part; + part=ep_alloc(8); j = tvb_get_ntohl(tvb, offset); - strcpy(part, "/vicepa"); + g_snprintf(part, 8, "/vicepa"); if ( i<nservers && j<=25 ) { part[6] = 'a' + (char) j; @@ -2679,9 +2680,10 @@ dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o } for (i=0; i<13; i++) { - char part[8]; + char *part; + part=ep_alloc(8); j = tvb_get_ntohl(tvb, offset); - strcpy(part, "/vicepa"); + g_snprintf(part, 8, "/vicepa"); if ( i<nservers && j<=25 ) { part[6] = 'a' + (char) j; @@ -2727,9 +2729,10 @@ dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o } for (i=0; i<13; i++) { - char part[8]; + char *part; + part=ep_alloc(8); j = tvb_get_ntohl(tvb, offset); - strcpy(part, "/vicepa"); + g_snprintf(part, 8, "/vicepa"); if ( i<nservers && j<=25 ) { part[6] = 'a' + (char) j; |