int i, n, h, c, idx;
uint32_t sig = 0;
const char *p = s;
+ char *tmp;
const unsigned char *entry;
unsigned char sig1, sig2;
xkb_keysym_t val;
}
if (*s == 'U') {
- val = strtoul(&s[1], NULL, 16);
+ val = strtoul(&s[1], &tmp, 16);
+ if (tmp && *tmp != '\0')
+ return XKB_KEYSYM_NO_SYMBOL;
if (val < 0x20 || (val > 0x7e && val < 0xa0))
return XKB_KEYSYM_NO_SYMBOL;
return val | 0x01000000;
}
else if (s[0] == '0' && s[1] == 'x') {
- return strtoul(&s[2], NULL, 16);
+ val = strtoul(&s[2], &tmp, 16);
+ if (tmp && *tmp != '\0')
+ return XKB_KEYSYM_NO_SYMBOL;
+
+ return val;
}
/* Stupid inconsistency between the headers and XKeysymDB: the former has