Commit 861fe5ae authored by walter harms's avatar walter harms Committed by Ulrich Sibiller

libX11/XKBNames.c fix: dereferenced before check

* Do not use variables before checked for NULL. Signed-off-by: 's avatarHarms <wharms@bfs,de> Reviewed-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent e7528f58
......@@ -778,9 +778,14 @@ XkbNoteNameChanges(XkbNameChangesPtr old,
{
int first, last, old_last, new_last;
if ((old == NULL) || (new == NULL))
return;
wanted &= new->changed;
if ((old == NULL) || (new == NULL) || (wanted == 0))
if (wanted == 0)
return;
if (wanted & XkbKeyTypeNamesMask) {
if (old->changed & XkbKeyTypeNamesMask) {
new_last = (new->first_type + new->num_types - 1);
......
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