From 83367a8d2d91bcfbb34080d64fc8b21b15c866c8 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Sat, 4 Apr 2009 09:46:20 -0700 Subject: [PATCH] xkbcomp: Ensure user has supplied a rules name --- src/xkbcomp/xkbcomp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xkbcomp/xkbcomp.c b/src/xkbcomp/xkbcomp.c index 67e42d3..7d22fb0 100644 --- a/src/xkbcomp/xkbcomp.c +++ b/src/xkbcomp/xkbcomp.c @@ -103,8 +103,10 @@ XkbcCompileKeymapFromRules(const char *rules, XkbRF_VarDefsPtr defs) XkbComponentNamesPtr names; XkbcDescPtr xkb; - if (!rules) + if (!rules || strlen(rules) == 0) { + ERROR("No rules supplied\n"); return NULL; + } pathlen = snprintf(rulesPath, sizeof(rulesPath), DFLT_XKB_CONFIG_ROOT "/rules/%s", rules);