wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 05053cb9954cdfab6c87d07f66ed34d19f9aa30a
parent 366420f45948989285eef5177c7f0059bc2fe880
Author: Kris Maglione <kris@suckless.org>
Date:   Tue, 27 Jul 2010 14:45:42 -0400

Don't allow extra content after colors ctl commands.

Diffstat:
cmd/wmii/message.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/cmd/wmii/message.c b/cmd/wmii/message.c @@ -906,15 +906,15 @@ msg_nudge(View *v, IxpMsg *m) { void msg_parsecolors(IxpMsg *m, CTuple *col) { + CTuple tpl; static char Ebad[] = "bad color string"; char n; - n = loadcolor(col, m->pos, m->end); - if(n == 0) - error(Ebad); - + n = loadcolor(&tpl, m->pos, m->end); m->pos += n; - msg_eatrunes(m, isspacerune, true); + if(n == 0 || msg_getword(m, nil)) + error(Ebad); + *col = tpl; } char*