Use snprintf() instead of sprintf() (#5907)

This commit is contained in:
Flössie
2020-09-15 14:56:57 +02:00
parent 49937a589f
commit 79278875da
18 changed files with 117 additions and 101 deletions

View File

@@ -390,7 +390,7 @@ Glib::ustring BatchQueue::getTempFilenameForParams( const Glib::ustring &filenam
timeval tv;
gettimeofday(&tv, nullptr);
char mseconds[11];
sprintf(mseconds, "%d", (int)(tv.tv_usec / 1000));
snprintf(mseconds, sizeof(mseconds), "%d", (int)(tv.tv_usec / 1000));
time_t rawtime;
struct tm *timeinfo;
char stringTimestamp [80];