summaryrefslogtreecommitdiffstats
path: root/fbench/src/fbench/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fbench/src/fbench/client.cpp')
-rw-r--r--fbench/src/fbench/client.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/fbench/src/fbench/client.cpp b/fbench/src/fbench/client.cpp
index 5c064159c65..e058ded2195 100644
--- a/fbench/src/fbench/client.cpp
+++ b/fbench/src/fbench/client.cpp
@@ -251,8 +251,9 @@ Client::run()
strlen("\nFBENCH: URL FETCH FAILED!\n"));
_output->write(&FBENCH_DELIMITER[1], strlen(FBENCH_DELIMITER) - 1);
} else {
- sprintf(timestr, "\nTIME USED: %0.4f s\n",
- _reqTimer->GetTimespan() / 1000.0);
+ snprintf(timestr, sizeof(timestr),
+ "\nTIME USED: %0.4f s\n",
+ _reqTimer->GetTimespan() / 1000.0);
_output->write(timestr, strlen(timestr));
_output->write(&FBENCH_DELIMITER[1], strlen(FBENCH_DELIMITER) - 1);
}