Use strncpy() instead of strcpy()

This commit is contained in:
Mathias Gumz 2015-01-29 11:52:00 +01:00
parent 37e8c1e93e
commit bf43ba16c4

View file

@ -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,