fix a potential null deref in malformed kb files

SVN revision: 72131
This commit is contained in:
Mike Blumenkrantz 2012-06-14 13:09:57 +00:00
parent a40771fd54
commit b04359a6a9
1 changed files with 2 additions and 2 deletions

View File

@ -209,7 +209,7 @@ parse_rules(void)
while (p[0] == ' ') ++p;
/* skip "grp" options for switching kbd layouts */
if (!(!strncmp(name, "grp", 3)))
if (strncmp(name, "grp", 3))
{
if (!strchr(name, ':'))
{
@ -228,7 +228,7 @@ parse_rules(void)
optgroups = eina_list_append(optgroups, group);
}
else
else if (group)
{
option = E_NEW(E_XKB_Option, 1);
option->name = eina_stringshare_add(name);