- Mar 08, 2025
-
-
Alan Coopersmith authored
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
- Feb 27, 2025
-
-
If XkbChangeTypesOfKey() is called with nGroups == 0, it will resize the key syms to 0 but leave the key actions unchanged. If later, the same function is called with a non-zero value for nGroups, this will cause a buffer overflow because the key actions are of the wrong size. To avoid the issue, make sure to resize both the key syms and key actions when nGroups is 0. (cherry picked from xorg/xserver@0e4ed949) Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> Reviewed-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!279>
-
Alan Coopersmith authored
Resolves warning from Oracle Parfait static analyser: Error: Uninitialised memory Uninitialised memory variable [uninitialised-mem-var] (CWE 457): Possible access to uninitialised memory referenced by variable 'mask' at line 721 of xkb/XKBMisc.c in function 'XkbUpdateKeyTypeVirtualMods'. Path in callee avoiding write at line 720 mask allocated at line 718 (cherry picked from xorg/xserver@a6574033) Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!279>
-
Alan Coopersmith authored
Based on xorg/xserver@97c9e6a7 Fixes: 8ba0ca32 ("Janitor: ansification, make distcheck, compiler warnings.") Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!279>
-
The current code seems to skip syms with width less than type->num_levels when calculating the total size for the new size_syms. This leads to less space being allocated than necessary during the next phase, which is to copy over the syms to the new location. This results in an overflow leading to a crash. (cherry picked from xorg/xserver@42ae2e81) Signed-off-by:
Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!279>
-
Apparently it needed to be nSyms*15/10, not *12/10; make it match the other allocation code. (cherry picked from xorg/xserver@f292de2e) Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!279>
-
Alan Coopersmith authored
Because XkbFreeGeometry takes a pointer to the geometry structure, and not the overall xkb structure like the other XkbFree*() calls, the caller is responsible for clearing the xkb->geom pointer to ensure it is not used after free. Based on xorg/xserver@629798c7 Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!279>
-
- Feb 23, 2025
-
-
Alan Coopersmith authored
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!280>
-
- Feb 02, 2025
-
-
Alan Coopersmith authored
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
- Jan 11, 2025
-
-
Alan Coopersmith authored
syncs with changes to libxcb 1.16 & 1.16.1 Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!277>
-
- Jan 10, 2025
-
-
Aaron Muir Hamilton authored
Part-of: <!270>
-
- Dec 30, 2024
-
-
Alan Coopersmith authored
It was made a static function in May 14, 1991 by rws in commit "make FirstCmp static" for X11R5 Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!276>
-
- Dec 14, 2024
-
-
Wismill authored
There are two issues with the use of `UCSConvertCase` in `XConvertCase`: - Some Latin-1 keysyms do not map within Latin-1, e.g. `ssharp`. Only Latin-1 keysyms have the same value as the Unicode code point of their corresponding character. So `UCSConvertCase` does not work for some Latin-1 keysyms as it returns Unicode code points outside Latin-1 that do not match their corresponding keysyms values. - Some Unicode keysyms should map to Latin-1 keysyms (<0x100). But the Unicode keysym mask 0x01000000 is applied blindly to the result of `UCSConvertCase`, resulting in invalid Unicode keysyms (0x010000nn) while they should be Latin-1 keysyms. Example with ß/ẞ: ```c KeySym lower, upper; XConvertCase(XK_ssharp, &lower, &upper); // Expected: lower == XK_ssharp, upper == U1E9E // Got: lower == XK_ssharp, upper == 0x1E9E XConvertCase(U1E9E, &lower, &upper); // Expected: lower == XK_ssharp, upper == U1E9E // Got: lower == 0x10000df, upper == U1E9E ``` Part-of: <!274>
-
- Nov 16, 2024
-
-
Closes: #225 Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!273>
-
- Nov 11, 2024
-
-
Alan Coopersmith authored
Clears 8 warnings from clang of the form: imDefIc.c:366:29: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] XIM_SET_PAD(&buf_s[2], len); /* pad */ ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 2 clang warnings: Xrm.c:1186:51: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] while (is_space(bits = next_char(c, str))) {}; ^ Xrm.c:1191:48: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] while (is_space(bits = next_char(c, str))) {}; ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
- Nov 10, 2024
-
-
Alan Coopersmith authored
Clears 2 clang warnings: XlibInt.c:672:26: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] DL_APPEND(*head, add); ^ XlibInt.c:694:36: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] DL_DELETE(*head, event); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 10 warnings from clang of the form: xcb_io.c:177:56: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] xcb_xlib_unknown_req_in_deq); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 24 warnings from clang of the form: TextExt16.c:63:34: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] CI_GET_DEFAULT_INFO_1D (fs, def); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 5 warnings from clang of the form: RdBitF.c:141:32: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] RETURN (BitmapFileInvalid); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 3 warnings from clang of the form: PolyReg.c:224:67: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 4 warnings from clang of the form: ParseCmd.c:158:43: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] PutCommandResource(options[i].value); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 4 warnings from clang of the form: CrGlCur.c:140:64: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] GetFunc (TryShapeCursorFunc, "XcursorTryShapeCursor", func); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Makes them match the style of the other macros here and clears up 5 clang warnings of the form: Context.c:194:27: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] _XCreateMutex(&db->linfo); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 13 warnings from clang of the form: Backgnd.c:44:72: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] OneDataCard32 (dpy, NEXTPTR(req,xChangeWindowAttributesReq), pixel); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 6 warnings from clang of the form: XKBBind.c:74:48: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] _XkbCheckPendingRefresh(dpy, dpy->xkb_info); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 46 warnings from clang of the form: XKB.c:207:69: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] BufAlloc(char *, out, (((size * 2) + (unsigned) 3) / 4) * 4); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 4 warnings from clang of the form: lcUtil.c:53:18: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] set_toupper(ch1); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 38 warnings from clang of the form: cmsLkCol.c:155:35: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] Data (dpy, colorname, (long)n); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 12 warnings from clang of the form: cmsCmap.c:194:34: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] DeqAsyncHandler(dpy, &async); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
- Nov 04, 2024
- Oct 26, 2024
-
-
Alan Coopersmith authored
Found by Oracle Parfait 13.3 static analyzer: X Resource Leak [X-resource-leak]: Leaked X Resource window at line 306 of imDefIm.c in function '_XimPreConnectionIM'. window initialized at line 300 with XCreateSimpleWindow Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!269>
-
- Oct 12, 2024
-
-
Alan Coopersmith authored
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!268>
-
- Sep 29, 2024
-
-
Alan Coopersmith authored
Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined: imCallbk.c:346:9: error: ‘memcpy’ offset 10 is out of the bounds [0, 1] [-Werror=array-bounds=] 346 | memcpy(&buf[p],&cbrec.text->string.mbs,length_in_bytes); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!267>
-
Alan Coopersmith authored
Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined: imDefIm.c: In function ‘_XimEncodingNegotiation’: imDefIm.c:1739:15: error: ‘memcpy’ offset 8 is out of the bounds [0, 1] [-Werror=array-bounds=] 1739 | (void)memcpy((char *)&buf_s[2], name_ptr, name_len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!267>
-
Alan Coopersmith authored
Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined: lcWrap.c: In function ‘_XlcDefaultMapModifiers’: lcWrap.c:149:9: warning: ‘strcpy’ writing between 4294967296 and 9223372036854775806 bytes into a region of size 1 [-Wstringop-overflow=] 149 | strcpy(mods, prog_mods); | ^~~~~~~~~~~~~~~~~~~~~~~ ../../include/X11/Xlibint.h:457:24: note: destination object of size 1 allocated by ‘malloc’ 457 | # define Xmalloc(size) malloc((size_t)((size) == 0 ? 1 : (size))) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lcWrap.c:147:12: note: in expansion of macro ‘Xmalloc’ 147 | mods = Xmalloc(i); | ^~~~~~~ lcWrap.c:149:9: error: ‘__builtin_memcpy’ forming offset [1, 4294967295] is out of the bounds [0, 1] [-Werror=array-bounds=] 149 | strcpy(mods, prog_mods); | ^~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!267>
-
- Aug 31, 2024
-
-
Alan Coopersmith authored
Clears warning from gcc 14.1: SetFPath.c: In function ‘XSetFontPath’: ../include/X11/Xlibint.h:463:24: warning: argument 1 value is zero [-Walloc-zero] 463 | # define Xmalloc(size) malloc((size_t)(size)) | ^~~~~~~~~~~~~~~~~~~~~~ SetFPath.c:61:18: note: in expansion of macro ‘Xmalloc’ 61 | if ((p = Xmalloc (nbytes))) { | ^~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!266>
-
- Aug 09, 2024
-
-
Olivier Fourdan authored
Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> Part-of: <!264>
-
Olivier Fourdan authored
Commit 1472048b to fix a colormap threading issue added a display lock/unlock and a call to SyncHandle() to _XcmsFreeClientCmaps(). When running synchronized, that means calling XSync(). _XcmsFreeClientCmaps() is called from _XFreeDisplayStructure() via XCloseDisplay() after the xcb connection is closed. So when running synchronized, we may end up calling XSync() after the xcb connection to the display is closed, which will generate a spurious XIO error: | #0 in _XDefaultIOError () at /lib64/libX11.so.6 | #1 in _XIOError () at /lib64/libX11.so.6 | #2 in _XReply () at /lib64/libX11.so.6 | #3 in XSync () at /lib64/libX11.so.6 | #4 in _XSyncFunction () at /lib64/libX11.so.6 | 8#5 in _XFreeDisplayStructure () at /lib64/libX11.so.6 | 8#6 in XCloseDisplay () at /lib64/libX11.so.6 To avoid that issue, closed the xcb connection to the display last. v2: And same in OutOfMemory() as well (José Expósito) Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> Reviewed-by:
José Expósito <jexposit@redhat.com> Part-of: <!264>
-
- Jul 28, 2024
-
-
Alan Coopersmith authored
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-