[PATCH] Return Success from generate_modkeymap() when max_keys_per_mod is zero

Adam Tkac atkac at redhat.com
Wed Aug 25 01:38:40 PDT 2010


Hello,

simple patch which corrects dix/inpututils.c:generate_modkeymap()
function is attached. Current generate_modkeymap function is broken
and returns BadAlloc when keyboard has no modifiers (i.e.
max_keys_per_mod is zero).

Although this bug has no effect for Xorg server ifself, it has effect
for Xvnc VNC server.

I've also checked parts of Xorg source which might be affected by this
change (because returned modkeymap can be NULL with the patch) and
this change doesn't cause any problem.

Patch applies to server-1.9-branch but apply it also to server-1.8-branch
and server-1.7-branch branches, please.

Regards, Adam

-- 
Adam Tkac, Red Hat, Inc.


More information about the xorg-devel mailing list