summaryrefslogtreecommitdiff
path: root/lib/backupstore/BackupStoreAccountDatabase.cpp
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2018-02-20 21:49:13 -0500
committerReinhard Tartler <siretart@tauware.de>2018-02-20 21:49:13 -0500
commitf28f88e5e72ba1499409047a9d6985eb312c0232 (patch)
treec9c267f18264b3dfe715a363935bb6ac20904492 /lib/backupstore/BackupStoreAccountDatabase.cpp
parente19a5db232e1ef90e9a02159d2fbd9707ffe4373 (diff)
parent6d7e9562e8485591a4888f1fc2d3c6c657dc7a01 (diff)
Merge tag 'BoxBackup-0.12.master.180102.6d7e956' into upstream
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)