Commit dc749a45 authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Ulrich Sibiller

_XkbReadGetMapReply: reject maxKeyCodes smaller than the minKeyCode

Various other bounds checks in the code assume this is true, so enforce it when we first get the data from the X server. Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: 's avatarJulien Cristau <jcristau@debian.org> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent 37f8d3eb
......@@ -485,6 +485,8 @@ unsigned mask;
if ( xkb->device_spec == XkbUseCoreKbd )
xkb->device_spec= rep->deviceID;
if ( rep->maxKeyCode < rep->minKeyCode )
return BadImplementation;
xkb->min_key_code = rep->minKeyCode;
xkb->max_key_code = rep->maxKeyCode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment