diff -NarU5 wmx-6pl1.orig/Config.C wmx-6pl1/Config.C
--- wmx-6pl1.orig/Config.C 2006-06-04 14:23:33.000000000 -0400
+++ wmx-6pl1/Config.C 2006-06-04 14:25:03.000000000 -0400
@@ -149,13 +149,25 @@
if (OPTION("off")) m_impl->rightBt = 0;
else if (OPTION("circulate")) m_impl->rightBt = 1;
else if (OPTION("lower")) m_impl->rightBt = 2;
else if (OPTION("toggleheight")) m_impl->rightBt = 4;
- if (OPTION("tabfg:")) strncpy(m_impl->tabfg, s, COLOR_LEN);
- if (OPTION("tabbg:")) strncpy(m_impl->tabbg, s, COLOR_LEN);
- if (OPTION("framebg:")) strncpy(m_impl->framebg, s, COLOR_LEN);
+ if (OPTION("tabfg:")) {
+ strncpy(m_impl->tabfg, s, COLOR_LEN);
+ m_impl->tabfg[COLOR_LEN-1] = '\0'; // prevent unterminated string
+ s += strlen(m_impl->tabfg); // avoid error message below
+ }
+ if (OPTION("tabbg:")) {
+ strncpy(m_impl->tabbg, s, COLOR_LEN);
+ m_impl->tabbg[COLOR_LEN-1] = '\0';
+ s += strlen(m_impl->tabbg);
+ }
+ if (OPTION("framebg:")) {
+ strncpy(m_impl->framebg, s, COLOR_LEN);
+ m_impl->framebg[COLOR_LEN-1] = '\0';
+ s += strlen(m_impl->framebg);
+ }
if (*s != '\0') {
fprintf(stderr, "\nwmx: Dynamic configuration error: "
"`%s' @ position %d", s, string - s);
}