X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/847ed634dcf26a99c8fb7751fe72720c391e2c4d..74ffd4ad21972c63bc21b07b22df673420e0bb47:/examples/msg/app-bittorrent/peer.c diff --git a/examples/msg/app-bittorrent/peer.c b/examples/msg/app-bittorrent/peer.c index 0ef1d35574..9469fab43a 100644 --- a/examples/msg/app-bittorrent/peer.c +++ b/examples/msg/app-bittorrent/peer.c @@ -204,8 +204,8 @@ int get_peers_data(peer_t peer) void peer_init(peer_t peer, int id, int seed) { peer->id = id; - sprintf(peer->mailbox, "%d", id); - sprintf(peer->mailbox_tracker, "tracker_%d", id); + snprintf(peer->mailbox,MAILBOX_SIZE-1, "%d", id); + snprintf(peer->mailbox_tracker,MAILBOX_SIZE-1, "tracker_%d", id); peer->peers = xbt_dict_new(); peer->active_peers = xbt_dict_new(); peer->hostname = MSG_host_get_name(MSG_host_self());