diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-09-21 15:38:12 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-09-21 15:38:12 +0000 |
commit | 7e2eed2a3047a182ba3b607e5c0a9c2b1d72e1d9 (patch) | |
tree | 1a18cb1664a8bbc2edf6c8aa5234d509dc55fe33 /epan/dissectors/packet-afs.c | |
parent | 523794f00a0d2f866d6f8aa44cedaa281d3e4710 (diff) |
remove some strcpy() with g_snprintf()
svn path=/trunk/; revision=15931
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; |