From 3447d96fe095692cba903c9ca789db089785e1ff Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 10 Feb 2022 19:54:20 +0500 Subject: [PATCH] qt: clear the filename buffer in plat_tempfile --- src/qt/qt_platform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 960fe27bf..da1e6b8a4 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -258,7 +258,7 @@ plat_tempfile(char *bufp, char *prefix, char *suffix) name.append(QDateTime::currentDateTime().toString("yyyyMMdd-hhmmss-zzzz")); if (suffix) name.append(suffix); - sprintf(&bufp[strlen(bufp)], "%s", name.toUtf8().data()); + strcpy(bufp, name.toUtf8().data()); } void plat_remove(char* path)