From 37e8c1e93ee8953b7ed5be3f4ac17b4c3e5bddcd Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Thu, 29 Jan 2015 11:46:57 +0100 Subject: Use strncpy() instead of strcpy() --- src/Workspace.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Workspace.cc b/src/Workspace.cc index bf2aea3..91f6da3 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -158,7 +158,7 @@ void Workspace::setName(const string &name) { } else { //if name == 0 then set default name from nls _FB_USES_NLS; char tname[128]; - sprintf(tname, + snprintf(tname, sizeof(tname), _FB_XTEXT(Workspace, DefaultNameFormat, "Workspace %d", "Default workspace names, with a %d for the workspace number").c_str(), m_id + 1); //m_id starts at 0 -- cgit v0.11.2