xkb: Fix possible NULL pointer dereference
sli is null before allocation assigment so deference t osli has to be protected. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
d6642de7eb
commit
2e6d717404
|
@ -556,6 +556,7 @@ Bool checkNames;
|
|||
else if ((kf!=NULL)&&((kf->xkb_sli->flags&XkbSLI_IsDefault)!=0)) {
|
||||
XkbDescPtr xkb;
|
||||
xkb= dev->key->xkbInfo->desc;
|
||||
sli= kf->xkb_sli;
|
||||
sli->physIndicators= xkb->indicators->phys_indicators;
|
||||
if (xkb->names->indicators!=sli->names) {
|
||||
checkNames= TRUE;
|
||||
|
@ -584,6 +585,8 @@ Bool checkNames;
|
|||
sli->maps= NULL;
|
||||
sli->names= NULL;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask))
|
||||
sli->names= calloc(XkbNumIndicators, sizeof(Atom));
|
||||
if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask))
|
||||
|
|
Loading…
Reference in New Issue
Block a user