aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira@fluxbox.org>2015-01-29 10:46:57 (GMT)
committerMathias Gumz <akira@fluxbox.org>2015-01-29 10:46:57 (GMT)
commit37e8c1e93ee8953b7ed5be3f4ac17b4c3e5bddcd (patch)
tree74e684a6e3ff0a56fe1c56484d67b4744d43df4f
parent129d0ac31efcefc21d083c1dc204d055c9269d82 (diff)
downloadfluxbox-37e8c1e93ee8953b7ed5be3f4ac17b4c3e5bddcd.zip
fluxbox-37e8c1e93ee8953b7ed5be3f4ac17b4c3e5bddcd.tar.bz2
Use strncpy() instead of strcpy()
-rw-r--r--src/Workspace.cc2
1 files changed, 1 insertions, 1 deletions
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) {
158 } else { //if name == 0 then set default name from nls 158 } else { //if name == 0 then set default name from nls
159 _FB_USES_NLS; 159 _FB_USES_NLS;
160 char tname[128]; 160 char tname[128];
161 sprintf(tname, 161 snprintf(tname, sizeof(tname),
162 _FB_XTEXT(Workspace, DefaultNameFormat, 162 _FB_XTEXT(Workspace, DefaultNameFormat,
163 "Workspace %d", "Default workspace names, with a %d for the workspace number").c_str(), 163 "Workspace %d", "Default workspace names, with a %d for the workspace number").c_str(),
164 m_id + 1); //m_id starts at 0 164 m_id + 1); //m_id starts at 0