summaryrefslogtreecommitdiff
path: root/lib/backupstore/BackupStoreAccountDatabase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/backupstore/BackupStoreAccountDatabase.cpp')
-rw-r--r--lib/backupstore/BackupStoreAccountDatabase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/backupstore/BackupStoreAccountDatabase.cpp b/lib/backupstore/BackupStoreAccountDatabase.cpp
index 201491a3..c5f012fc 100644
--- a/lib/backupstore/BackupStoreAccountDatabase.cpp
+++ b/lib/backupstore/BackupStoreAccountDatabase.cpp
@@ -247,7 +247,8 @@ void BackupStoreAccountDatabase::Write()
{
// Write out the entry
char line[256]; // more than enough for a couple of integers in string form
- int s = ::sprintf(line, "%x:%d\n", i->second.GetID(), i->second.GetDiscSet());
+ int s = ::snprintf(line, sizeof(line), "%x:%d\n",
+ i->second.GetID(), i->second.GetDiscSet());
if(::write(file, line, s) != s)
{
THROW_EXCEPTION(CommonException, OSFileError)