aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/Imakefile
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-07-06 11:13:49 -0700
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:29 +0200
commitf20f91ee89607537dfc6bfaec05d18e9830bea13 (patch)
tree5fec29879aeb7ff03b7b33e699834a0b53e5ad6a /nx-X11/Imakefile
parent37b8d68832cfd6f20b321d9d7e757027c75677f2 (diff)
downloadnx-libs-f20f91ee89607537dfc6bfaec05d18e9830bea13.tar.gz
nx-libs-f20f91ee89607537dfc6bfaec05d18e9830bea13.tar.bz2
nx-libs-f20f91ee89607537dfc6bfaec05d18e9830bea13.zip
Fix validation of ctrls parameter to XkbGetPerClientControls()
Nothing in the XKB spec states that the memory pointed to by ctrls has to be initialized to any given value when passed to the function, only that it is set by the function to the values returned by the X server: http://www.x.org/releases/X11R7.7/doc/libX11/XKB/xkblib.html#The_Miscellaneous_Per_client_Controls The check for the incoming value seems to be copied from XkbSetPerClientControls without explanation. Instead change it to checking if ctrls is non-NULL, since there's no point asking the X server to return a value the caller won't even see. Found while investigating report from cppcheck-1.65: [nx-X11/lib/X11/XKB.c:699] -> [nx-X11/lib/X11/XKB.c:719]: (warning) Possible null pointer dereference: ctrls - otherwise it is redundant to check it against null. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/Imakefile')
0 files changed, 0 insertions, 0 deletions