mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 12:08:19 +02:00
XKB: Avoid a possible NULL dereference
XKBGeom.c:191:25: warning: Access to field 'x1' results in a dereference of a null pointer (loaded from variable 'rbounds')
_XkbCheckBounds(bounds,rbounds->x1,rbounds->y1);
^~~~~~~
Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
626e5e34be
commit
4024091678
1 changed files with 2 additions and 2 deletions
|
|
@ -147,7 +147,7 @@ register int i;
|
|||
XkbShapePtr shape;
|
||||
XkbRowPtr row;
|
||||
XkbDoodadPtr doodad;
|
||||
XkbBoundsPtr bounds,rbounds=NULL;
|
||||
XkbBoundsPtr bounds,rbounds;
|
||||
|
||||
if ((!geom)||(!section))
|
||||
return False;
|
||||
|
|
@ -186,7 +186,7 @@ XkbBoundsPtr bounds,rbounds=NULL;
|
|||
default:
|
||||
tbounds.x1= tbounds.x2= doodad->any.left;
|
||||
tbounds.y1= tbounds.y2= doodad->any.top;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
_XkbCheckBounds(bounds,rbounds->x1,rbounds->y1);
|
||||
_XkbCheckBounds(bounds,rbounds->x2,rbounds->y2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue