aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
Commit message (Collapse)AuthorAgeFilesLines
* Free fs->properties in XF86BigfontQueryFont overflow error pathAlan Coopersmith2016-10-191-0/+1
| | | | | | | | | | | Fixes small memory leak introduced in commit 5669a22081 Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Hint: Upstream commit 5669a22081 is "integer overflow in _XF86BigfontQueryFont() [CVE-2013-1981 2/13]" Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* xkb: fix off-by-one in _XkbReadGetNamesReply and _XkbReadVirtualModMapJulien Cristau2016-10-192-2/+2
| | | | | | | | | | | | The size of the arrays is max_key_code + 1. This makes these functions consistent with the other checks added for CVE-2013-1997. Also check the XkbGetNames reply when names->keys was just allocated. Signed-off-by: Julien Cristau <jcristau@debian.org> Tested-by: Colin Walters <walters@verbum.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Revert "Add a couple fixups for the security patches"Ulrich Sibiller2016-10-193-3/+2
| | | | | | This reverts commit b092864a39bbcd4f34c5c26a7cd0df90e235815d. We will use the proper libX11 upstream patches now.
* Remove more unnecessary casts from Xmalloc/calloc callsAlan Coopersmith2016-10-1933-132/+112
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Move big request comment in XOpenDisplay to the right placeAlan Coopersmith2016-10-191-1/+3
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix very weird indenting in nx-X11/lib/X11/GetFProp.cAlan Coopersmith2016-10-191-12/+12
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XAllocClassHint: Assume calloc sets pointers in allocated memory to NULLAlan Coopersmith2016-10-191-6/+1
| | | | | | | | | | | While the C standard technically allows for the compiler to translate pointer = 0 or pointer = NULL into something other than filling the pointer address with 0 bytes, the rest of the Xlib code already assumes that calloc initializes any pointers in the struct to NULL, and there are no known systems supported by X.Org where this is not true. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* _xudc_code_to_glyph: check for NULL pointer *before* writing to it, not afterAlan Coopersmith2016-10-191-4/+4
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Assume size_t is always available, since it was defined in C89Alan Coopersmith2016-10-191-8/+1
| | | | | | | | | Don't provide a fallback definition #ifdef X_NOT_POSIX anymore. We already use size_t throughout the rest of Xlib, just had this one instance left in XKBGAlloc.c of a fallback definition. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* unifdef XKB_IN_SERVERAlan Coopersmith2016-10-194-50/+0
| | | | | | | | | Leftovers from XKB files that were previously shared between the client and server code, but aren't any more. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Convert more sprintf calls to snprintfAlan Coopersmith2016-10-194-10/+11
| | | | | | | | | You could analyze most of these and quickly recognize that there was no chance of buffer overflow already, but why make everyone spend time doing that when we can just make it obviously safe? Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XKeysymToString: move variable declarations to the scope of their usageAlan Coopersmith2016-10-191-14/+10
| | | | | | | | | | | | Makes it easier for readers to understand scope of variable usage, and clears up gcc warning: KeysymStr.c: In function 'XKeysymToString': KeysymStr.c:128:13: warning: declaration of 'i' shadows a previous local [-Wshadow] KeysymStr.c:73:18: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Preserve constness in casting arguments through the Data*() routinesAlan Coopersmith2016-10-197-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Casts were annoying gcc by dropping constness when changing types, when routines simply either copy data into the request buffer or send it directly to the X server, and never modify the input. Fixes gcc warnings including: ChProp.c: In function 'XChangeProperty': ChProp.c:65:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] ChProp.c:65:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] ChProp.c:74:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] ChProp.c:74:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] ChProp.c:83:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] SetHints.c: In function 'XSetStandardProperties': SetHints.c:262:20: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] SetPntMap.c: In function 'XSetPointerMapping': SetPntMap.c:46:5: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] SetPntMap.c:46:5: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] StBytes.c: In function 'XStoreBuffer': StBytes.c:97:33: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] StName.c: In function 'XStoreName': StName.c:40:27: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] StName.c: In function 'XSetIconName': StName.c:51:27: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XStringToKeysym: preserve constness when casting off unsignedness for strcmpAlan Coopersmith2016-10-191-1/+1
| | | | | | | | Fixes gcc warning: StrKeysym.c:97:17: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XRebindKeysym: Drop unnecessary const-removing castAlan Coopersmith2016-10-191-1/+1
| | | | | | | | | | C89 defines memcpy as taking a const void *, so casting from const unsigned char * to char * simply angers gcc for no benefit: KeyBind.c:1017:24: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* cmsColNm.c: maintain constness of arguments to qsort helper functionAlan Coopersmith2016-10-191-1/+1
| | | | | | | | | | | Fixes gcc warning: cmsColNm.c: In function 'FirstCmp': cmsColNm.c:257:20: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] cmsColNm.c:257:45: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Remove unused DECnet ("DNETCONN") code from XlibAlan Coopersmith2016-10-192-4/+1
| | | | | | | | | Has never been converted to build in modular builds, so has been unusable since X11R7.0 release in 2005. DNETCONN support was removed from xtrans back in 2008. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Remove unused TLI ("STREAMSCONN") code from XlibAlan Coopersmith2016-10-193-125/+1
| | | | | | | | | | Has never been converted to build in modular builds, so has been unusable since X11R7.0 release in 2005. All known platforms with TLI/XTI support that X11R7 & later releases run on also have (and mostly prefer) BSD socket support for their networking API. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Don't hard code path to Xcms.txt file.Egbert Eich2016-10-192-2/+2
| | | | | | | | | The path to this file is configurable at build time. The source however contains a hard coded path. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XIM: remove Private and Public macrosYaakov Selkowitz2016-10-1924-470/+467
| | | | | | | | | Private is a struct member name in mingw-w64 <winioctl.h>, causing this useless define in a private header to break the build. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Convert XCreate{Pix,Bit}map...Data to use C99 designated initializersAlan Coopersmith2016-10-192-47/+44
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XCreate{Pix,Bit}map...Data: Free pixmap in error path if XCreateGC failsAlan Coopersmith2016-10-192-4/+10
| | | | | | | | | | | | | | | | | Fixes leaks in error paths found by Parfait 1.0.0: Error: X Resource Leak Leaked X Resource pix at line 62 of CrBFData.c in function 'XCreateBitmapFromData'. pix initialized at line 60 with XCreatePixmap Error: X Resource Leak Leaked X Resource pix at line 70 of CrPFBData.c in function 'XCreatePixmapFromBitmapData'. pix initialized at line 66 with XCreatePixmap Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Events: Store event cookie when dequeuing eventPhilipp Reh2016-10-192-0/+2
| | | | | | | | | When we dequeue an event in XCheckTypedEvent or XCheckTypedWindowEvent, make sure to store the corresponding cookie too. Signed-off-by: Philipp Reh <sefi@s-e-f-i.de> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* clang analyzer: Don't warn about Xmalloc(0)Jeremy Huddleston2016-10-191-1/+1
| | | | | | | | This will prevent a number of false positives in where clang's static analysis reports about calls to malloc(0). Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Silence clang static analysis warnings for SetReqLenJeremy Huddleston2016-10-191-0/+5
| | | | | | | | | | | | | | | | | | | This provides a simplified version of the SetReqLen macro when using clang for static analysis. Prior to this change, we would see many Idempotent operation warnings inside this macro due to the common case of calling with arg2 and arg3 being the same variable. This has no effect on code produced during compilation, but it silences a number of false positives in static analysis. XIPassiveGrab.c:170:5: warning: Assigned value is always the same as the existing value SetReqLen(req, num_modifiers, num_modifiers); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from XIPassiveGrab.c:26: .../nx-X11/lib/X11/Xlibint.h:580:8: note: instantiated from: n = badlen; \ ^ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix man page and comment references to use XFreeModifiermap (lowercase map)Alan Coopersmith2016-10-191-1/+1
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Mark XKeycodeToKeysym as _X_DEPRECATEDJeremy Huddleston2016-10-191-0/+1
| | | | | Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* libX11: Fixing modifier key range in Xutil.h (Bug #21910)Bodo Graumann2016-10-191-1/+1
| | | | | | | | | | | | | | | | | IsModifierKey, defined in include/X11/Xutil.h, is a macro determining, which keys are regarded as modifiers. The constants ISO_Level5_Shift, ISO_Level5_Latch and ISO_Level5_Lock where excluded previously, leaving some Neo2 modifiers functionless in combination with compose. This patch adjusts the range to include the correct, full range of modifier constants. Neo2 Bug 277 <http://wiki.neo-layout.org/ticket/277> X.Org Bug 21910 <http://bugs.freedesktop.org/show_bug.cgi?id=21910> Signed-off-by: Bodo Graumann <mail@bodograumann.de> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Switch GetEmptyReq and GetResReq to call _XGetRequestPeter Hutterer2016-10-191-30/+6
| | | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* include: Add GetReqSized() for request buffers of specific sizePeter Hutterer2016-10-191-0/+12
| | | | | | | | | | Some XI2 requests change in size over different versions and libXi would need to hack around GetReq and GetReqExtra. Add a new GetReqSized so the library can explicitly specify the size of the request in 4-byte units. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Use GetReqSized for GetReq and GetReqExtraPeter Hutterer2016-10-191-4/+4
| | | | | | | | | | GetEmptyReq and GetResReq cannot do this due to the final typecast - typically requests that need either of those do not have their own typedef in the protocol headers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* ximcp/imRmAttr: Handle leaking missing_listErkki Seppälä2016-10-191-1/+2
| | | | | | | | | | | | Fixed memory leak by adding Xfree and initializing missing_list with NULL Variable "missing_list" goes out of scope Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* ximcp/imRm: Handle leaking colormap_retErkki Seppälä2016-10-191-0/+4
| | | | | | | | | | | | Fixed memory leak by adding Xfree for colormap_ret Variable "colormap_ret" goes out of scope Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* ximcp/imTrX: Handle failing XGetWindowPropertyErkki Seppälä2016-10-191-12/+21
| | | | | | | | | | | Checked return value of XGetWindowProperty and return false if it fails. Return value of "XGetWindowProperty(im->core.display, spec->lib_connect_wid, prop, 0L, (length + bytes_after_ret + 3UL) / 4UL, 1, 0UL, &type_ret, &format_ret, &nitems, &bytes_after_ret, &prop_ret)" is not checked Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* ximcp/imLckup: Handle negative return value from _XlcwctombErkki Seppälä2016-10-191-0/+4
| | | | | | | | | | | | | | | | | | Fixed by negative value to memcpy by checking for the negative return value of _Xlcwctomb and returning 0/XLookupNone in that case. a negative value was passed to memcpy Unfortunately the other return values for *status don't fit into the error (which appears to indicate some internal error or running out of memory). The other valid status codes are XBufferOverflow, XLookupNone, XLookupChars, XLookupKeySym, and XLookupBoth. Each of these has a specific meaning attached. Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* lc/def/lcDefConv: Use Xcalloc to avoid use of uninitialized memoryAnder Conselvan de Oliveira2016-10-192-2/+2
| | | | | | | | | | | | | Fixed by zero'ing conv on allocation with Xcalloc. Then close_converter works properly. Using uninitialized value "conv->state" in call to function "close_converter" Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix status reporting for braille patternsSamuel Thibault2016-10-191-6/+20
| | | | | | | | | _XimLocalMbLookupString can return a braille keysym even if _Xlcwctomb can't convert to the current MB charset. _XimLocalUtf8LookupString needs to set the braille keysym and status too. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Make the Local XIM request key releases for brailleSamuel Thibault2016-10-191-1/+1
| | | | | | | | | Braille chords management needs key release events. We need to explicitly request then, else GTK would not pass them throught XFilterEvent and braille wouldn't work. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* im/ximcp: release modifiermap before returningErkki Seppälä2016-10-191-2/+9
| | | | | | | | | | | Variable "map" goes out of scope Release modifiermap before returning. Reordered code to call XGetModifierMapping after the first return from the function. Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Dirk Wallenstein <halsmit@t-online.de> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix "attrinute" typo in comments in ximcpAlan Coopersmith2016-10-191-2/+2
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix leaks in _XimEncodingNegotiation error paths.Ander Conselvan de Oliveira2016-10-191-26/+25
| | | | | | | | | name_ptr and detail_ptr weren't free'd in some cases before returning False. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix memory leaks on _XimProtoCreateIC error paths.Ander Conselvan de Oliveira2016-10-191-2/+2
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix memory leaks on _XimWriteCachedDefaultTree error paths.Ander Conselvan de Oliveira2016-10-191-1/+4
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix memory leak on _XimCommitRecv error path.Ander Conselvan de Oliveira2016-10-191-1/+3
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix memory leaks on _XimCbDispatch error path.Ander Conselvan de Oliveira2016-10-191-0/+2
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* om: Fix memory leak on read_EncodingInfo error path.Ander Conselvan de Oliveira2016-10-191-1/+3
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* om: Fix potential memory leak in init_om.Ander Conselvan de Oliveira2016-10-191-10/+12
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* om: Fix memory leaks on get_font_name error paths.Ander Conselvan de Oliveira2016-10-191-8/+6
| | | | | | | | While at it, remove unneeded check for NULL before Xfree. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix potential uninitialized variable access in _XimMakeICAttrIDListJeremy Huddleston2016-10-191-2/+5
| | | | | | | Found by clang static analysis Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Return name instead of value in XGetIMValues() and XSetIMValues()Yann Droneaud2016-10-191-6/+6
| | | | | | | | | | | | | | | | | | As stated in man page (XOpenIM) and Xlib documentation (chapter 13.5.3), XGetIMValues() and XSetImValues() "returns the name of the first argument that could not be obtained." But currently, err = XGetIMValues(im, "invalid", &arg, NULL); returns &arg instead of "invalid". This patch fixes https://bugs.freedesktop.org/show_bug.cgi?id=12897 Signed-off-by: Yann Droneaud <yann@droneaud.fr> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>