From 2ffd4e4f1af16b17a286ff354603a717f5d828a5 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:12:18 +0200 Subject: Replace all calls to sprintf() by calls to snprintf(). --- test/ask.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ask.cxx') diff --git a/test/ask.cxx b/test/ask.cxx index 8c708cad1..0c2365149 100644 --- a/test/ask.cxx +++ b/test/ask.cxx @@ -106,7 +106,7 @@ void timer_cb(void *) { // test message title assignment with a local buffer { // local scope for buf char buf[40]; // test: use local variable - sprintf(buf, "Message #%d", n); // fill message title + snprintf(buf, 40, "Message #%d", n); // fill message title fl_message_title(buf); // set message title strcpy(buf, "** void **"); // overwrite buffer to be sure } // buf goes out of scope here -- cgit v1.2.3