aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-05-04 15:34:31 -0700
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:25 +0200
commit7efa7da59e27ad72e7f1b554f85804b82977cbef (patch)
tree325d3384e5343a59a9d2a4f99cd19a62d29d17da /nx-X11/lib
parent1d806a5550490ab2d97ddd3daf3b1e1eb2a779b8 (diff)
downloadnx-libs-7efa7da59e27ad72e7f1b554f85804b82977cbef.tar.gz
nx-libs-7efa7da59e27ad72e7f1b554f85804b82977cbef.tar.bz2
nx-libs-7efa7da59e27ad72e7f1b554f85804b82977cbef.zip
XKB: XkbComputeSectionBounds: Check correct bounds in default switch-case
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> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib')
-rw-r--r--nx-X11/lib/X11/XKBGeom.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nx-X11/lib/X11/XKBGeom.c b/nx-X11/lib/X11/XKBGeom.c
index 39ed4bed7..2f34bea80 100644
--- a/nx-X11/lib/X11/XKBGeom.c
+++ b/nx-X11/lib/X11/XKBGeom.c
@@ -146,7 +146,7 @@ register int i;
XkbShapePtr shape;
XkbRowPtr row;
XkbDoodadPtr doodad;
-XkbBoundsPtr bounds,rbounds=NULL;
+XkbBoundsPtr bounds,rbounds;
if ((!geom)||(!section))
return False;
@@ -185,6 +185,7 @@ XkbBoundsPtr bounds,rbounds=NULL;
default:
tbounds.x1= tbounds.x2= doodad->any.left;
tbounds.y1= tbounds.y2= doodad->any.top;
+ rbounds= &tbounds;
break;
}
_XkbCheckBounds(bounds,rbounds->x1,rbounds->y1);