···11+commit 59917d28a3c41ad22d6fc52e323cafe2cdd596d5
22+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
33+Date: Sat Mar 8 15:23:04 2025 -0800
44+55+ libX11 1.8.12
66+77+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
88+99+commit 5f8077b257ea27a5fd6f114d2bc15284b2416b3c
1010+Author: Olivier Fourdan <ofourdan@redhat.com>
1111+Date: Thu Nov 28 14:09:04 2024 +0100
1212+1313+ xkb: Fix buffer overflow in XkbChangeTypesOfKey()
1414+1515+ If XkbChangeTypesOfKey() is called with nGroups == 0, it will resize the
1616+ key syms to 0 but leave the key actions unchanged.
1717+1818+ If later, the same function is called with a non-zero value for nGroups,
1919+ this will cause a buffer overflow because the key actions are of the wrong
2020+ size.
2121+2222+ To avoid the issue, make sure to resize both the key syms and key actions
2323+ when nGroups is 0.
2424+2525+ (cherry picked from xorg/xserver@0e4ed94952b255c04fe910f6a1d9c852878dcd64)
2626+2727+ Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2828+ Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2929+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
3030+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279>
3131+3232+commit 865fd56aeb5c5d1812cce46ed197873c48b08692
3333+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
3434+Date: Sun Nov 1 15:45:08 2020 -0800
3535+3636+ xkb: always set *mask_rtrn in XkbVirtualModsToReal
3737+3838+ Resolves warning from Oracle Parfait static analyser:
3939+4040+ Error: Uninitialised memory
4141+ Uninitialised memory variable [uninitialised-mem-var] (CWE 457):
4242+ Possible access to uninitialised memory referenced by variable 'mask'
4343+ at line 721 of xkb/XKBMisc.c in function 'XkbUpdateKeyTypeVirtualMods'.
4444+ Path in callee avoiding write at line 720
4545+ mask allocated at line 718
4646+4747+ (cherry picked from xorg/xserver@a6574033f464c7cde02bce8f1b130ff6b2b2d9eb)
4848+4949+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
5050+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279>
5151+5252+commit 88d1a84ca3c0f87ffcb83b9b96e34a7121d5e2d3
5353+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
5454+Date: Sat Feb 22 11:59:13 2025 -0800
5555+5656+ XkbChangeTypesOfKey: verify newTypesIn is not null before using it
5757+5858+ Based on xorg/xserver@97c9e6a7139e07a0761be05034fae42fcd65ba36
5959+6060+ Fixes: 8ba0ca32 ("Janitor: ansification, make distcheck, compiler warnings.")
6161+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
6262+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279>
6363+6464+commit 48a1335cab13d883e15b4eb5e9a5e080289a5c64
6565+Author: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
6666+Date: Tue May 29 10:17:50 2012 +0530
6767+6868+ xkb: Allocate size_syms correctly when width of a type increases
6969+7070+ The current code seems to skip syms with width less than
7171+ type->num_levels when calculating the total size for the new
7272+ size_syms. This leads to less space being allocated than necessary
7373+ during the next phase, which is to copy over the syms to the new
7474+ location. This results in an overflow leading to a crash.
7575+7676+ (cherry picked from xorg/xserver@42ae2e8199fe875319978249963de7499607988b)
7777+7878+ Signed-off-by: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
7979+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
8080+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
8181+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279>
8282+8383+commit 158be3ebd7d1da4d16bfc2dee82aac477fbcb833
8484+Author: Daniel Stone <daniel@fooishbar.org>
8585+Date: Wed Mar 21 02:04:12 2007 +0200
8686+8787+ XKB: Fix size_syms calculation bug
8888+8989+ Apparently it needed to be nSyms*15/10, not *12/10; make it match the
9090+ other allocation code.
9191+9292+ (cherry picked from xorg/xserver@f292de2ef13dc994a38029cee9e2642576893332)
9393+9494+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
9595+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279>
9696+9797+commit d6e1ca046aef42ec5465ece5edbdffe0bc7c0cb6
9898+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
9999+Date: Sat Feb 22 10:13:52 2025 -0800
100100+101101+ XkbFreeKeyboard: set xkb->geom to NULL after freeing it
102102+103103+ Because XkbFreeGeometry takes a pointer to the geometry structure,
104104+ and not the overall xkb structure like the other XkbFree*() calls,
105105+ the caller is responsible for clearing the xkb->geom pointer to
106106+ ensure it is not used after free.
107107+108108+ Based on xorg/xserver@629798c73ad76a77fa6a55bc6403fd9b95ade2bb
109109+110110+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
111111+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279>
112112+113113+commit 4a3ca6eeced253aacb0e2ecf640b9eb93863badc
114114+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
115115+Date: Sun Feb 23 15:19:54 2025 -0800
116116+117117+ x11.pc: Add URL field
118118+119119+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
120120+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/280>
121121+122122+commit 23f0352eca362515d598bfdbd8ecec070dcd1b28
123123+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
124124+Date: Sun Feb 2 13:54:27 2025 -0800
125125+126126+ libX11 1.8.11
127127+128128+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
129129+130130+commit 4665733565eda7ae32302c3abf1aaf5075b8abde
131131+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
132132+Date: Sat Jan 11 10:31:08 2025 -0800
133133+134134+ configure: drop `pthread-stubs` dependency on Dragonfly, FreeBSD, & NetBSD
135135+136136+ syncs with changes to libxcb 1.16 & 1.16.1
137137+138138+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
139139+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/277>
140140+141141+commit ba15d51bfe789e84e291ccfb31d5f0ae6192969e
142142+Author: Aaron Muir Hamilton <aaron@correspondwith.me>
143143+Date: Sun Oct 27 21:42:23 2024 -0400
144144+145145+ ximcp/imRm.c: allow XNArea with OnTheSpot
146146+147147+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/270>
148148+149149+commit 61175323a8a374aaedb139894987ddaf2bb2ba27
150150+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
151151+Date: Mon Dec 30 10:27:23 2024 -0800
152152+153153+ cmsColNm: remove obsolete comment about FirstCmp being public
154154+155155+ It was made a static function in May 14, 1991 by rws in
156156+ commit "make FirstCmp static" for X11R5
157157+158158+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
159159+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/276>
160160+161161+commit 7c75a066454fbafe586f7c24aeee65348f9d2bcc
162162+Author: Pierre Le Marre <dev@wismill.eu>
163163+Date: Mon Dec 9 14:51:17 2024 +0100
164164+165165+ Fix misuse of UCSConvertCase in XConvertCase
166166+167167+ There are two issues with the use of `UCSConvertCase` in `XConvertCase`:
168168+169169+ - Some Latin-1 keysyms do not map within Latin-1, e.g. `ssharp`.
170170+ Only Latin-1 keysyms have the same value as the Unicode code point of
171171+ their corresponding character. So `UCSConvertCase` does not work for
172172+ some Latin-1 keysyms as it returns Unicode code points outside Latin-1
173173+ that do not match their corresponding keysyms values.
174174+ - Some Unicode keysyms should map to Latin-1 keysyms (<0x100). But the
175175+ Unicode keysym mask 0x01000000 is applied blindly to the result of
176176+ `UCSConvertCase`, resulting in invalid Unicode keysyms (0x010000nn)
177177+ while they should be Latin-1 keysyms.
178178+179179+ Example with ß/ẞ:
180180+181181+ ```c
182182+ KeySym lower, upper;
183183+184184+ XConvertCase(XK_ssharp, &lower, &upper);
185185+ // Expected: lower == XK_ssharp, upper == U1E9E
186186+ // Got: lower == XK_ssharp, upper == 0x1E9E
187187+188188+ XConvertCase(U1E9E, &lower, &upper);
189189+ // Expected: lower == XK_ssharp, upper == U1E9E
190190+ // Got: lower == 0x10000df, upper == U1E9E
191191+ ```
192192+193193+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/274>
194194+195195+commit 5a7d94e07fc7e4a10d6399f5e44793fa0c896af6
196196+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
197197+Date: Tue Nov 12 12:40:04 2024 -0800
198198+199199+ xkb: avoid undefined behavior due to left shift overflow
200200+201201+ Closes: #225
202202+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
203203+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/273>
204204+205205+commit 1ef3c6f010c03eade038b4e662c0eef47014800d
206206+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
207207+Date: Sun Nov 10 15:38:25 2024 -0800
208208+209209+ XIM_SET_PAD: add do ... while (0) to avoid -Wextra-semi-stmt warnings
210210+211211+ Clears 8 warnings from clang of the form:
212212+213213+ imDefIc.c:366:29: warning: empty expression statement has no effect;
214214+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
215215+ XIM_SET_PAD(&buf_s[2], len); /* pad */
216216+ ^
217217+218218+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
219219+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
220220+221221+commit 22ded6890e9d11cc9eca59737fc531d40ec284a6
222222+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
223223+Date: Sun Nov 10 15:30:48 2024 -0800
224224+225225+ Xrm.c: remove unneccessary ; after {}
226226+227227+ Clears 2 clang warnings:
228228+229229+ Xrm.c:1186:51: warning: empty expression statement has no effect;
230230+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
231231+ while (is_space(bits = next_char(c, str))) {};
232232+ ^
233233+ Xrm.c:1191:48: warning: empty expression statement has no effect;
234234+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
235235+ while (is_space(bits = next_char(c, str))) {};
236236+ ^
237237+238238+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
239239+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
240240+241241+commit b7f59114abb4a4766d7fd5805d0435d023cd0c4b
242242+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
243243+Date: Sun Nov 10 15:29:21 2024 -0800
244244+245245+ DL_APPEND/DL_DELETE: remove trailing semicolon from definitions
246246+247247+ Clears 2 clang warnings:
248248+249249+ XlibInt.c:672:26: warning: empty expression statement has no effect;
250250+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
251251+ DL_APPEND(*head, add);
252252+ ^
253253+ XlibInt.c:694:36: warning: empty expression statement has no effect;
254254+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
255255+ DL_DELETE(*head, event);
256256+ ^
257257+258258+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
259259+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
260260+261261+commit da431b8f7ff21d36b5a88237c991ca43b185d65f
262262+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
263263+Date: Sun Nov 10 15:25:40 2024 -0800
264264+265265+ xcb_io.c: add do ... while (0) to avoid -Wextra-semi-stmt warnings
266266+267267+ Clears 10 warnings from clang of the form:
268268+269269+ xcb_io.c:177:56: warning: empty expression statement has no effect;
270270+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
271271+ xcb_xlib_unknown_req_in_deq);
272272+ ^
273273+274274+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
275275+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
276276+277277+commit a53c45d69e88799e59dfbd324843df65a30cf4a9
278278+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
279279+Date: Sun Nov 10 13:16:41 2024 -0800
280280+281281+ CI_GET_*_INFO_*: add do ... while (0) to avoid -Wextra-semi-stmt warnings
282282+283283+ Clears 24 warnings from clang of the form:
284284+285285+ TextExt16.c:63:34: warning: empty expression statement has no effect;
286286+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
287287+ CI_GET_DEFAULT_INFO_1D (fs, def);
288288+ ^
289289+290290+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
291291+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
292292+293293+commit 68912288218527846b04cbe8d647a2c252e82e20
294294+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
295295+Date: Sun Nov 10 13:11:12 2024 -0800
296296+297297+ RETURN: add do ... while (0) to avoid -Wextra-semi-stmt warnings
298298+299299+ Clears 5 warnings from clang of the form:
300300+301301+ RdBitF.c:141:32: warning: empty expression statement has no effect;
302302+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
303303+ RETURN (BitmapFileInvalid);
304304+ ^
305305+306306+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
307307+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
308308+309309+commit 38c642c8ebd69f761fdda03664eba6889a331598
310310+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
311311+Date: Sun Nov 10 13:08:31 2024 -0800
312312+313313+ poly.h: add do ... while (0) to avoid -Wextra-semi-stmt warnings
314314+315315+ Clears 3 warnings from clang of the form:
316316+317317+ PolyReg.c:224:67: warning: empty expression statement has no effect;
318318+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
319319+ BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres);
320320+ ^
321321+322322+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
323323+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
324324+325325+commit 906bf4a86d174ed20fda925d8f82de023aa26d2d
326326+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
327327+Date: Sun Nov 10 12:37:53 2024 -0800
328328+329329+ PutCommandResource: add do ... while (0) to avoid -Wextra-semi-stmt warnings
330330+331331+ Clears 4 warnings from clang of the form:
332332+333333+ ParseCmd.c:158:43: warning: empty expression statement has no effect;
334334+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
335335+ PutCommandResource(options[i].value);
336336+ ^
337337+338338+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
339339+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
340340+341341+commit c0768ab687fa07f83d0030dd161f4aa49cbe84f8
342342+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
343343+Date: Sun Nov 10 12:35:44 2024 -0800
344344+345345+ GetFunc: add do ... while (0) to avoid -Wextra-semi-stmt warnings
346346+347347+ Clears 4 warnings from clang of the form:
348348+349349+ CrGlCur.c:140:64: warning: empty expression statement has no effect;
350350+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
351351+ GetFunc (TryShapeCursorFunc, "XcursorTryShapeCursor", func);
352352+ ^
353353+354354+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
355355+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
356356+357357+commit 49350501687d9633a86ae317d5311228e7d812e8
358358+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
359359+Date: Sun Nov 10 12:33:01 2024 -0800
360360+361361+ _XCreateMutex/_XFreeMutex: remove trailing semicolon from definitions
362362+363363+ Makes them match the style of the other macros here and clears
364364+ up 5 clang warnings of the form:
365365+366366+ Context.c:194:27: warning: empty expression statement has no effect;
367367+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
368368+ _XCreateMutex(&db->linfo);
369369+ ^
370370+371371+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
372372+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
373373+374374+commit 41c4aa408c3488e920e1f08eb946442faa051e6c
375375+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
376376+Date: Sun Nov 10 11:52:19 2024 -0800
377377+378378+ OneDataCard32: add do ... while (0) to avoid -Wextra-semi-stmt warnings
379379+380380+ Clears 13 warnings from clang of the form:
381381+382382+ Backgnd.c:44:72: warning: empty expression statement has no effect;
383383+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
384384+ OneDataCard32 (dpy, NEXTPTR(req,xChangeWindowAttributesReq), pixel);
385385+ ^
386386+387387+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
388388+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
389389+390390+commit 68e6caad8fcad28143769384536d4529fe0161c4
391391+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
392392+Date: Sun Nov 10 11:48:41 2024 -0800
393393+394394+ _XkbCheckPendingRefresh: add do ... while (0) to avoid -Wextra-semi-stmt
395395+396396+ Clears 6 warnings from clang of the form:
397397+398398+ XKBBind.c:74:48: warning: empty expression statement has no effect;
399399+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
400400+ _XkbCheckPendingRefresh(dpy, dpy->xkb_info);
401401+ ^
402402+403403+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
404404+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
405405+406406+commit 563ddd4ff5575e3f8bbf635cbdc339b09a7e285e
407407+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
408408+Date: Sun Nov 10 11:09:56 2024 -0800
409409+410410+ BufAlloc: add do { ... } while (0) to avoid -Wextra-semi-stmt warnings
411411+412412+ Clears 46 warnings from clang of the form:
413413+414414+ XKB.c:207:69: warning: empty expression statement has no effect;
415415+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
416416+ BufAlloc(char *, out, (((size * 2) + (unsigned) 3) / 4) * 4);
417417+ ^
418418+419419+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
420420+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
421421+422422+commit 5e22c4b3d56d8327d8610faabc8ecfc0c45399de
423423+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
424424+Date: Sun Nov 10 11:06:28 2024 -0800
425425+426426+ set_toupper: add do { ... } while (0) to avoid -Wextra-semi-stmt warnings
427427+428428+ Clears 4 warnings from clang of the form:
429429+430430+ lcUtil.c:53:18: warning: empty expression statement has no effect;
431431+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
432432+ set_toupper(ch1);
433433+ ^
434434+435435+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
436436+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
437437+438438+commit 4cb567d9a05b4a995a50e2fe178c2e697d339668
439439+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
440440+Date: Sun Nov 10 10:27:39 2024 -0800
441441+442442+ Data: add do ... while (0) to avoid -Wextra-semi-stmt warnings
443443+444444+ Clears 38 warnings from clang of the form:
445445+446446+ cmsLkCol.c:155:35: warning: empty expression statement has no effect;
447447+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
448448+ Data (dpy, colorname, (long)n);
449449+ ^
450450+451451+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
452452+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
453453+454454+commit 9ab8f6a5f73cbe0675d1555504f6ec269c9dde8d
455455+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
456456+Date: Sun Nov 10 10:14:49 2024 -0800
457457+458458+ DeqAsyncHandler: add do ... while (0) to avoid -Wextra-semi-stmt warnings
459459+460460+ Clears 12 warnings from clang of the form:
461461+462462+ cmsCmap.c:194:34: warning: empty expression statement has no effect;
463463+ remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
464464+ DeqAsyncHandler(dpy, &async);
465465+ ^
466466+467467+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
468468+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
469469+470470+commit 8703ecf105d5bf6e5b105bc25ceaee8f43344c71
471471+Author: Julien Cristau <jcristau@debian.org>
472472+Date: Fri Nov 1 13:03:56 2024 +0100
473473+474474+ ximcp: hide internal functions
475475+476476+ commit 13e9ac4d45 "ximcp: Unmark to fabricate key events with XKeyEvent
477477+ serial" added new _XimFabricateSerial / _XimUnfabricateSerial /
478478+ _XimIsFabricatedSerial functions; they don't need to be exported by
479479+ libX11.
480480+481481+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/271>
482482+483483+commit 41bc1a9dbe5b634489539f7779078d4a3b35df5e
484484+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
485485+Date: Sat Oct 26 11:02:42 2024 -0700
486486+487487+ ximcp: don't leak window if XGetAtomName() fails
488488+489489+ Found by Oracle Parfait 13.3 static analyzer:
490490+ X Resource Leak [X-resource-leak]:
491491+ Leaked X Resource window
492492+ at line 306 of imDefIm.c in function '_XimPreConnectionIM'.
493493+ window initialized at line 300 with XCreateSimpleWindow
494494+495495+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
496496+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/269>
497497+498498+commit df1f1a47f90e71fbe68b1fe57bd021ac2320579b
499499+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
500500+Date: Sun Jul 21 12:31:56 2024 -0700
501501+502502+ _XGetRequest: Set data field to 0 when initializing new requests
503503+504504+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
505505+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/268>
506506+507507+commit f2ebbce6d0978d2d84f840196b03ee35a3ca1736
508508+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
509509+Date: Sun Sep 29 10:24:23 2024 -0700
510510+511511+ _XimStrConversionCallback: use size_t to calculate size to malloc
512512+513513+ Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined:
514514+515515+ imCallbk.c:346:9: error: ‘memcpy’ offset 10 is out of the bounds [0, 1]
516516+ [-Werror=array-bounds=]
517517+ 346 | memcpy(&buf[p],&cbrec.text->string.mbs,length_in_bytes);
518518+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
519519+520520+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
521521+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/267>
522522+523523+commit 75c5bdee81b3a1147c2f123db7a052a4a79fbea4
524524+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
525525+Date: Sun Sep 29 10:04:40 2024 -0700
526526+527527+ _XimEncodingNegotiation: swap order of arguments to calloc
528528+529529+ Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined:
530530+531531+ imDefIm.c: In function ‘_XimEncodingNegotiation’:
532532+ imDefIm.c:1739:15: error: ‘memcpy’ offset 8 is out of the bounds [0, 1]
533533+ [-Werror=array-bounds=]
534534+ 1739 | (void)memcpy((char *)&buf_s[2], name_ptr, name_len);
535535+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
536536+537537+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
538538+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/267>
539539+540540+commit 1f01aafa6d9100c5d4a48636b188334cdb223bd5
541541+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
542542+Date: Sun Sep 29 09:06:32 2024 -0700
543543+544544+ _XlcDefaultMapModifiers: remove conversions between size_t & int
545545+546546+ Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined:
547547+548548+ lcWrap.c: In function ‘_XlcDefaultMapModifiers’:
549549+ lcWrap.c:149:9: warning: ‘strcpy’ writing between 4294967296 and
550550+ 9223372036854775806 bytes into a region of size 1 [-Wstringop-overflow=]
551551+ 149 | strcpy(mods, prog_mods);
552552+ | ^~~~~~~~~~~~~~~~~~~~~~~
553553+ ../../include/X11/Xlibint.h:457:24: note: destination object of size 1
554554+ allocated by ‘malloc’
555555+ 457 | # define Xmalloc(size) malloc((size_t)((size) == 0 ? 1 : (size)))
556556+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
557557+ lcWrap.c:147:12: note: in expansion of macro ‘Xmalloc’
558558+ 147 | mods = Xmalloc(i);
559559+ | ^~~~~~~
560560+ lcWrap.c:149:9: error: ‘__builtin_memcpy’ forming offset [1, 4294967295]
561561+ is out of the bounds [0, 1] [-Werror=array-bounds=]
562562+ 149 | strcpy(mods, prog_mods);
563563+ | ^~~~~~~~~~~~~~~~~~~~~~~
564564+565565+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
566566+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/267>
567567+568568+commit 86e71472bc826ac5c850e200cb3820485b5689cf
569569+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
570570+Date: Sat Aug 31 10:49:16 2024 -0700
571571+572572+ SetFontPath: if ndirs is 0, skip work to make a list of directories
573573+574574+ Clears warning from gcc 14.1:
575575+576576+ SetFPath.c: In function ‘XSetFontPath’:
577577+ ../include/X11/Xlibint.h:463:24: warning: argument 1 value is zero
578578+ [-Walloc-zero]
579579+ 463 | # define Xmalloc(size) malloc((size_t)(size))
580580+ | ^~~~~~~~~~~~~~~~~~~~~~
581581+ SetFPath.c:61:18: note: in expansion of macro ‘Xmalloc’
582582+ 61 | if ((p = Xmalloc (nbytes))) {
583583+ | ^~~~~~~
584584+585585+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
586586+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/266>
587587+588588+commit 19b2f5c2d0935cbf9c17ecf30604f80592807b59
589589+Author: Olivier Fourdan <ofourdan@redhat.com>
590590+Date: Fri Aug 9 10:24:13 2024 +0200
591591+592592+ Fix indentation
593593+594594+ Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
595595+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/264>
596596+597597+commit f3d6ebac35301d4ad068e307f0fbe6aa12ccbccb
598598+Author: Olivier Fourdan <ofourdan@redhat.com>
599599+Date: Fri Aug 9 09:21:31 2024 +0200
600600+601601+ Close xcb connection after freeing display structure
602602+603603+ Commit 1472048b7 to fix a colormap threading issue added a display
604604+ lock/unlock and a call to SyncHandle() to _XcmsFreeClientCmaps().
605605+606606+ When running synchronized, that means calling XSync().
607607+608608+ _XcmsFreeClientCmaps() is called from _XFreeDisplayStructure() via
609609+ XCloseDisplay() after the xcb connection is closed.
610610+611611+ So when running synchronized, we may end up calling XSync() after the
612612+ xcb connection to the display is closed, which will generate a spurious
613613+ XIO error:
614614+615615+ | #0 in _XDefaultIOError () at /lib64/libX11.so.6
616616+ | #1 in _XIOError () at /lib64/libX11.so.6
617617+ | #2 in _XReply () at /lib64/libX11.so.6
618618+ | #3 in XSync () at /lib64/libX11.so.6
619619+ | #4 in _XSyncFunction () at /lib64/libX11.so.6
620620+ | 8#5 in _XFreeDisplayStructure () at /lib64/libX11.so.6
621621+ | 8#6 in XCloseDisplay () at /lib64/libX11.so.6
622622+623623+ To avoid that issue, closed the xcb connection to the display last.
624624+625625+ v2: And same in OutOfMemory() as well (José Expósito)
626626+627627+ Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
628628+ Reviewed-by: José Expósito <jexposit@redhat.com>
629629+ Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/264>
630630+1631commit ed9fb5535efe1e5278654b6b3994a34337b4bf1a
2632Author: Alan Coopersmith <alan.coopersmith@oracle.com>
3633Date: Sun Jul 28 10:37:55 2024 -0700
···31313232 https://www.x.org/wiki/Development/Documentation/SubmittingPatches
33333434+## Release 1.8.12
3535+3636+ * x11.pc: Add URL field (!280)
3737+ * xkb: Bring over fixes from Xserver to shared XKB source files (!279)
3838+3939+## Release 1.8.11
4040+4141+ * Close xcb connection after freeing display structure to avoid XIO error
4242+ when running synchronized (!264)
4343+ * Don't allocate memory for a zero-sized list of directories when
4444+ `SetFontPath()` is called with `ndirs == 0` (!266)
4545+ * Fix `-Werror=array-bounds` build failures with gcc 14.2 when
4646+ `MALLOC_0_RETURNS_NULL` is defined (!267)
4747+ * Set `data` field to 0 when initializing new requests (!268)
4848+ * ximcp: don't leak window if `XGetAtomName()` fails (!269)
4949+ * ximcp: allow XNArea with OnTheSpot (!270)
5050+ * ximcp: hide internal functions added in 1.8.10 (!271)
5151+ * Handle `-Wextra-semi-stmt` warnings from clang (!272)
5252+ * xkb: avoid undefined behavior due to left shift overflow (#225, !273)
5353+ * Fix misuse of `UCSConvertCase()` in `XConvertCase()` (!274)
5454+ * drop `pthread-stubs` dependency on Dragonfly, FreeBSD, & NetBSD (!277)
5555+3456## Release 1.8.10
35573658 * Re-fix XIM input sometimes jumbled (#205, #206, #207, #208, !246)
···11831183 if (c == '#') { /* Directive */
11841184 /* remove extra whitespace */
11851185 only_pcs = True;
11861186- while (is_space(bits = next_char(c, str))) {};
11861186+ while (is_space(bits = next_char(c, str))) {}
11871187 /* only "include" directive is currently defined */
11881188 if (!strncmp(str, "include", 7)) {
11891189 str += (7-1);
11901190 /* remove extra whitespace */
11911191- while (is_space(bits = next_char(c, str))) {};
11911191+ while (is_space(bits = next_char(c, str))) {}
11921192 /* must have a starting " */
11931193 if (c == '"') {
11941194 _Xconst char *fname = str+1;
+9
lib/libX11/src/config.h.in
···2121/* Use dlopen to load shared libraries */
2222#undef HAVE_DLOPEN
23232424+/* Define to 1 if you have the `getaddrinfo' function. */
2525+#undef HAVE_GETADDRINFO
2626+2427/* Define to 1 if you have the `getpagesize' function. */
2528#undef HAVE_GETPAGESIZE
2929+3030+/* Define to 1 if you have the `inet_ntop' function. */
3131+#undef HAVE_INET_NTOP
26322733/* Define to 1 if you have the <inttypes.h> header file. */
2834#undef HAVE_INTTYPES_H
···71777278/* Define to 1 if you have the `strtol' function. */
7379#undef HAVE_STRTOL
8080+8181+/* Define to 1 if the system has the type `struct sockaddr_storage'. */
8282+#undef HAVE_STRUCT_SOCKADDR_STORAGE
74837584/* Define to 1 if you have the <sys/filio.h> header file. */
7685#undef HAVE_SYS_FILIO_H
+8-8
lib/libX11/src/poly.h
···8080 * If it is moving to the left, then we don't want it to flip until
8181 * we traverse an entire pixel.
8282 */
8383-#define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) { \
8383+#define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) do { \
8484 int dx; /* local storage */ \
8585\
8686 /* \
···104104 d = -2 * m * (dy) + 2 * dx; \
105105 } \
106106 } \
107107-}
107107+} while (0)
108108109109-#define BRESINCRPGON(d, minval, m, m1, incr1, incr2) { \
109109+#define BRESINCRPGON(d, minval, m, m1, incr1, incr2) do { \
110110 if (m1 > 0) { \
111111 if (d > 0) { \
112112 minval += m1; \
···126126 d += incr2; \
127127 } \
128128 } \
129129-}
129129+} while (0)
130130131131132132/*
···256256 * the caller when the edge has been removed so he
257257 * can reorder the Winding Active Edge Table.
258258 */
259259-#define EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) { \
259259+#define EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) do { \
260260 if (pAET->ymax == y) { /* leaving this edge */ \
261261 pPrevAET->next = pAET->next; \
262262 pAET = pPrevAET->next; \
···269269 pPrevAET = pAET; \
270270 pAET = pAET->next; \
271271 } \
272272-}
272272+} while (0)
273273274274275275/*
···279279 * x value to be ready for the next scanline.
280280 * The even-odd rule is in effect.
281281 */
282282-#define EVALUATEEDGEEVENODD(pAET, pPrevAET, y) { \
282282+#define EVALUATEEDGEEVENODD(pAET, pPrevAET, y) do { \
283283 if (pAET->ymax == y) { /* leaving this edge */ \
284284 pPrevAET->next = pAET->next; \
285285 pAET = pPrevAET->next; \
···291291 pPrevAET = pAET; \
292292 pAET = pAET->next; \
293293 } \
294294-}
294294+} while (0)
···2424#include <sys/select.h>
2525#endif
26262727-#define xcb_fail_assert(_message, _var) { \
2727+#define xcb_fail_assert(_message, _var) do { \
2828 unsigned int _var = 1; \
2929 fprintf(stderr, "[xcb] Aborting, sorry about that.\n"); \
3030 assert(!_var); \
3131-}
3131+} while (0)
32323333-#define throw_thread_fail_assert(_message, _var) { \
3333+#define throw_thread_fail_assert(_message, _var) do { \
3434 fprintf(stderr, "[xcb] " _message "\n"); \
3535 if (_Xglobal_lock) { \
3636 fprintf(stderr, "[xcb] You called XInitThreads, this is not your fault\n"); \
···3939 "and XInitThreads has not been called\n"); \
4040 } \
4141 xcb_fail_assert(_message, _var); \
4242-}
4242+} while (0)
43434444/* XXX: It would probably be most useful if we stored the last-processed
4545 * request, so we could find the offender from the message. */
4646-#define throw_extlib_fail_assert(_message, _var) { \
4646+#define throw_extlib_fail_assert(_message, _var) do { \
4747 fprintf(stderr, "[xcb] " _message "\n"); \
4848 fprintf(stderr, "[xcb] This is most likely caused by a broken X " \
4949 "extension library\n"); \
5050 xcb_fail_assert(_message, _var); \
5151-}
5151+} while (0)
52525353static void return_socket(void *closure)
5454{
-1
lib/libX11/src/xcms/cmsColNm.c
···248248/*
249249 * DESCRIPTION
250250 * Compares the color names of XcmsColorTuples.
251251- * This routine is public to allow access from qsort???.
252251 *
253252 * RETURNS
254253 * 0 if equal;
···32323333/* Don't use <ctype.h> here because it is locale dependent. */
34343535-#define set_toupper(ch) \
3535+#define set_toupper(ch) do { \
3636 if (ch >= 'a' && ch <= 'z') \
3737- ch = (unsigned char) (ch - 'a' + 'A');
3737+ ch = (unsigned char) (ch - 'a' + 'A'); \
3838+} while (0)
38393940/* Compares two ISO 8859-1 strings, ignoring case of ASCII letters.
4041 Like strcasecmp in an ASCII locale. */
+3-3
lib/libX11/src/xlibi18n/lcWrap.c
···134134 const char *user_mods,
135135 const char *prog_mods)
136136{
137137- int i;
137137+ size_t i;
138138 char *mods;
139139140140 if (!_XlcValidModSyntax(prog_mods, im_valid))
141141 return (char *)NULL;
142142 if (!_XlcValidModSyntax(user_mods, im_valid))
143143 return (char *)NULL;
144144- i = (int) strlen(prog_mods) + 1;
144144+ i = strlen(prog_mods) + 1;
145145 if (user_mods)
146146- i = (int) ((size_t) i + strlen(user_mods));
146146+ i += strlen(user_mods);
147147 mods = Xmalloc(i);
148148 if (mods) {
149149 strcpy(mods, prog_mods);