[PATCH] libx11 xkb/XKBMAlloc.c fix check for map->num_types

walter harms wharms at bfs.de
Fri Jun 6 00:28:20 PDT 2014

Am 06.06.2014 08:21, schrieb Alan Coopersmith:
> On 06/ 5/14 04:21 PM, Daniel Stone wrote:
>> Hi,
>> On 5 June 2014 15:46, walter harms <wharms at bfs.de
>> <mailto:wharms at bfs.de>> wrote:
>>     fix: check for map->num_types overflow
>>     compiletestested, i have no example to check this condition
>>     but i guess that this was the original author intended
>>   This isn't an overflow check, but one to ensure that we always have
>> at least
>> XkbNumRequiredTypes types in the map.
> Right - it looks like we just want to remove the ! from
> (!map->num_types < XkbNumRequiredTypes) instead of inverting the check.

I do not thing so. If i understand to code right it adds a new map
if the is no space. I guess XkbNumRequiredTypes is the number of
predefined maps and the idea of the original author was ! (map->num_types < XkbNumRequiredTypes)
what translate into the more readable (map->num_types >= XkbNumRequiredTypes).

ntl i found a possible bug in the xkb section also and ask Peter Hutter about it, would you
mind if i send  you a copy ?


More information about the xorg-devel mailing list