summary refs log tree commit diff
path: root/parse.y
diff options
context:
space:
mode:
authorokan <okan>2014-01-29 22:30:00 +0000
committerokan <okan>2014-01-29 22:30:00 +0000
commit1fd3fc49974bdc0c7703b53d9eaea29529e80643 (patch)
tree8f675eaa3c96da03db2404ea9b28390af60a459e /parse.y
parent2b233f0548bb026eebb336bcdac57e48f0839e5c (diff)
parent2be890489b8542b12f77133fbba404210c1b5f54 (diff)
downloadcwm-1fd3fc49974bdc0c7703b53d9eaea29529e80643.tar.gz
cwm-1fd3fc49974bdc0c7703b53d9eaea29529e80643.tar.xz
cwm-1fd3fc49974bdc0c7703b53d9eaea29529e80643.zip
cvsimport
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 861dfb9..7255a1a 100644
--- a/parse.y
+++ b/parse.y
@@ -139,7 +139,12 @@ main		: FONTNAME STRING		{
 			conf->snapdist = $2;
 		}
 		| COMMAND STRING string		{
-			conf_cmd_add(conf, $2, $3);
+			if (!conf_cmd_add(conf, $2, $3)) {
+				yyerror("command name/path too long");
+				free($2);
+				free($3);
+				YYERROR;
+			}
 			free($2);
 			free($3);
 		}