summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-26 16:12:18 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-26 16:12:18 +0200
commit2ffd4e4f1af16b17a286ff354603a717f5d828a5 (patch)
tree99e2d4a7e2fde8e3abb027eb687901440750ee00 /src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx
parent53d9614adbb728fc4db983c9bb817c6eea870994 (diff)
Replace all calls to sprintf() by calls to snprintf().
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx
index da2d2b303..a4b8672ce 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx
@@ -457,7 +457,7 @@ static const char *find_best_font(const char *fname, int size) {
// whoa! A scalable font! Use unless exact match found:
int l = c-thisname;
memcpy(namebuffer,thisname,l);
- l += sprintf(namebuffer+l,"%d",size);
+ l += snprintf(namebuffer+l, 1024-l,"%d",size);
while (*c == '0') c++;
strcpy(namebuffer+l,c);
name = namebuffer;