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/table.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/table.cxx') diff --git a/test/table.cxx b/test/table.cxx index 1a540ea4f..dbca2e89f 100644 --- a/test/table.cxx +++ b/test/table.cxx @@ -54,7 +54,7 @@ void DemoTable::draw_cell(TableContext context, int R, int C, int X, int Y, int W, int H) { static char s[40]; - sprintf(s, "%d/%d", R, C); // text for each cell + snprintf(s, 40, "%d/%d", R, C); // text for each cell switch ( context ) { @@ -271,7 +271,7 @@ void setcellbgcolor_cb(Fl_Widget *w, void *data) char *itoa(int val) { static char s[80]; - sprintf(s, "%d", val); + snprintf(s, 80, "%d", val); return(s); } -- cgit v1.2.3