From 673041f76297706b7679f3140891e8ab1dd548d8 Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 28 Jan 2014 20:22:21 +0000 Subject: Check ignore windowname for truncation and provide user feedback during config parse; based on a discussion with Tiago Cunha. --- parse.y | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index 33d49a0..f218a13 100644 --- a/parse.y +++ b/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.54 2014/01/28 00:42:20 okan Exp $ */ +/* $OpenBSD: parse.y,v 1.55 2014/01/28 20:22:21 okan Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -151,7 +151,11 @@ main : FONTNAME STRING { free($3); } | IGNORE STRING { - conf_ignore(conf, $2); + if (!conf_ignore(conf, $2)) { + yyerror("ignore windowname too long"); + free($2); + YYERROR; + } free($2); } | BIND STRING string { -- cgit v1.2.3-2-gb3c3