make xkb parsing a tiny bit more safe

ticket #2180


SVN revision: 83591
This commit is contained in:
Mike Blumenkrantz 2013-02-04 11:44:52 +00:00
parent 9bcaf51cc0
commit a1425546f3
1 changed files with 4 additions and 4 deletions

View File

@ -92,7 +92,7 @@ parse_rules(void)
if (n) *n = '\0';
/* means end of section */
if (!buf[0]) break;
if (eina_strlen_bounded(buf, 3) < 2) break;
/* get rid of initial 2 spaces here */
p = buf + 2;
tmp = strdup(p);
@ -129,7 +129,7 @@ parse_rules(void)
n = strchr(buf, '\n');
if (n) *n = '\0';
if (!buf[0]) break;
if (eina_strlen_bounded(buf, 3) < 2) break;
p = buf + 2;
tmp = strdup(p);
@ -171,7 +171,7 @@ parse_rules(void)
n = strchr(buf, '\n');
if (n) *n = '\0';
if (!buf[0]) break;
if (eina_strlen_bounded(buf, 3) < 2) break;
p = buf + 2;
tmp = strdup(p);
@ -214,7 +214,7 @@ parse_rules(void)
n = strchr(buf, '\n');
if (n) *n = '\0';
if (!buf[0]) break;
if (eina_strlen_bounded(buf, 3) < 2) break;
p = buf + 2;
tmp = strdup(p);