use snprintf instead of sprintf

This commit is contained in:
Arvid Norberg 2011-03-30 16:04:24 +00:00
parent 113fa0ba3d
commit 38caeb43d2
1 changed files with 1 additions and 1 deletions

View File

@ -530,7 +530,7 @@ namespace libtorrent
i->size = pad_size;
i->offset = off;
char name[30];
std::sprintf(name, ".____padding_file/%d", padding_file);
snprintf(name, sizeof(name), ".____padding_file/%d", padding_file);
i->set_name(name);
i->pad_file = true;
off += pad_size;