aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreivanov89 <eivanov89@ydb.tech>2022-09-16 16:11:30 +0300
committereivanov89 <eivanov89@ydb.tech>2022-09-16 16:11:30 +0300
commitadb84b77f034b6ea45b1fa3873faccb32668c27e (patch)
tree43789413dfe559ad67396f7d6af1e53bde5b7e18
parent95f0da341aaf0f5bb6701d4d425970535b1d79db (diff)
downloadydb-adb84b77f034b6ea45b1fa3873faccb32668c27e.tar.gz
fix stack buffer overflow
-rw-r--r--ydb/core/tx/datashard/testload/test_load_upsert.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/ydb/core/tx/datashard/testload/test_load_upsert.cpp b/ydb/core/tx/datashard/testload/test_load_upsert.cpp
index cdc2b29b9c5..a64b1e75925 100644
--- a/ydb/core/tx/datashard/testload/test_load_upsert.cpp
+++ b/ydb/core/tx/datashard/testload/test_load_upsert.cpp
@@ -37,9 +37,7 @@ enum class ERequestType {
TString GetKey(size_t n) {
// user1000385178204227360
- char buf[24];
- sprintf(buf, "user%.19lu", n);
- return buf;
+ return Sprintf("user%.19lu", n);
}
const TString Value = TString(100, 'x');