From bf43ba16c417bd39131fd0a3fd8efe48405a8a2c Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Thu, 29 Jan 2015 11:52:00 +0100 Subject: Use strncpy() instead of strcpy() --- src/FbTk/XFontImp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FbTk/XFontImp.cc b/src/FbTk/XFontImp.cc index 524dc72..2bae4e6 100644 --- a/src/FbTk/XFontImp.cc +++ b/src/FbTk/XFontImp.cc @@ -205,7 +205,7 @@ void XFontImp::rotate(FbTk::Orientation orient) { 0, 0, boxlen, boxlen); // draw the character centre top right on canvas - sprintf(text, "%c", ichar); + snprintf(text, 1, "%c", ichar); font_gc.setForeground(1); XDrawImageString(dpy, canvas.drawable(), font_gc.gc(), boxlen/2 - lbearing, -- cgit v0.11.2