Commit graph

1713 commits

Author SHA1 Message Date
Alan Coopersmith
4400a68b3a unifdef Lynx
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-20 17:05:50 -08:00
Alan Coopersmith
1e56b27429 unifdef __QNX__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-20 17:05:50 -08:00
Alan Coopersmith
ab0a301482 unifdef __uxp__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-20 17:05:50 -08:00
Alan Coopersmith
4ce3962b70 unifdef __vax__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-20 17:05:50 -08:00
Alan Coopersmith
65a6f162fd unifdef __sgi_not_xconsortium
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-20 17:05:50 -08:00
Alan Coopersmith
3296d7b8d1 unifdef __sgi
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-20 17:05:50 -08:00
Alan Coopersmith
4322fff7e1 unifdef sgi
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-20 17:05:50 -08:00
Alan Coopersmith
613d3624c2 unifdef hpux
Also removes shl_load() support, which was only buildable for HP-UX

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-20 17:05:42 -08:00
Alan Coopersmith
225a4bbbbd unifdef __UNIXOS2__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11 14:56:22 -08:00
Alan Coopersmith
0df284b450 unifdef ultrix
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11 14:50:29 -08:00
Alan Coopersmith
c3f3eb1284 unifdef AIXV3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11 14:49:13 -08:00
Alan Coopersmith
b35344c9a7 unifdef __osf__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11 14:47:31 -08:00
Takao Fujiwara
041b5291f0
imDefLkup: Commit first info in XimCommitInfo
Xic.private.proto.commit_info can receive multiple XimCommitInfo
when typing keys very quickly like an bar code scanner (or evemu-play)
and the first info in XimCommitInfo should be committed to keep
the typing key order.

Fixes: #198
2024-01-31 20:27:57 +09:00
Takao Fujiwara
024d229fdf
ximcp: Unmark to fabricate key events with XKeyEvent serial
_XimProtoKeypressFilter() and _XimProtoKeyreleaseFilter() can
receive XKeyEvent from both the typing on the keyboard and the
callback of XIM_FORWARD_EVENT.

If the filter functions unmark to fabricate XKeyEvent from the typing
on the keyboard during receiving XKeyEvent from the callback of
XIM_FORWARD_EVENT with typing keys very quickly likes an bar code
scanner (or evemu-play), XIM server cannot receive some key events and
it causes the key typing order to get scrambled.

Now XIM client saves the serial in XKeyEvent and the filter functions
unmark to fabricate XKeyEvent from the callback of XIM_FORWARD_EVENT
only.

Fixes: #198
2024-01-31 20:26:40 +09:00
Peter Hutterer
ae3eca18ce Fix _XkbReadGetDeviceInfoReply for nButtons == dev->buttons
XkbGetDeviceInfo(dpy, XkbXI_ButtonActionsMask, 2, 0, 0) always returns
NULL because the number of buttons on the device equals (unsurpisingly)
the number of buttons requested (i.e. first + nBtns == dev->nbuttons).

This currently causes it to bail out and return NULL.

Fixes f293659d5a
2024-01-18 00:07:04 +00:00
Walter Harms
0a951047f6 _XimProtoIMFree:no need to check arg for Xfree()
Xfree() will happily ignore NULL, no need to check
2024-01-08 17:18:19 +01:00
Walter Harms
dce614623e _XimEncodeString:no need to check arg for Xfree()
Xfree() will happily ignore NULL, no need to check
2024-01-08 17:01:44 +01:00
Walter Harms
4f78b61580 Fix XCreateIC() memory leak (Part 2)
Direct leak of 12 byte(s) in 2 object(s) allocated from:
    #0 0x7f4f25c3f7a7 in strdup (/usr/lib64/libasan.so.6+0x5c7a7)
    #1 0x7f4f252ce6a1 in _XimEncodeString libX11-1.8.3/modules/im/ximcp/imRm.c:818
    #2 0x7f4f252ce6a1 in _XimEncodeString libX11-1.8.3/modules/im/ximcp/imRm.c:807
    #3 0x7f4f252d2f0f in _XimSetICValueData libX11-1.8.3/modules/im/ximcp/imRm.c:2912
    #4 0x7f4f252b536a in _XimLocalCreateIC libX11-1.8.3/modules/im/ximcp/imLcIc.c:176
    #5

 0x7f4f251f0105 in XCreateIC libX11-1.8.3/src/xlibi18n/ICWrap.c:251

detected and fix by Patrick Lerda <patrick9876@free.fr>
applied with adjustment, do changes when OOM (unlikely but good practise)
2024-01-08 16:50:52 +01:00
Walter Harms
ed0b97e480 _XimLocalDestroyIC:fix possible mem leak
Adapted:
Fix XCreateIC() memory leak by Patrick Lerda <patrick9876@free.fr> Part 1
2024-01-08 16:21:02 +01:00
Walter Harms
07978634b8 _XimLocalCreateIC: get rid of bzero 2024-01-08 15:16:11 +01:00
Walter Harms
59c9a89e25 _XimLocalCreateIC: minor cleanup
minor cleanup, no code change
2024-01-08 15:09:49 +01:00
Walter Harms
e5b14e59a1 _XimLocalCreateIC:no need to check arg for Xfree()
Xfree() will happily ignore NULL, no need to check
2024-01-08 13:35:28 +01:00
Walter Harms
e6310b5212 _XimLocalDestroyIC: no need to check arg for Xfree()
Xfree() will happily ignore NULL, no need to check
2024-01-08 13:06:03 +01:00
Walter Harms
1261802fb3 fix table width
the width of first column was to small and
caused a hyphenation. there is only one word,
fix for me.
2024-01-07 18:30:30 +01:00
Alan Coopersmith
c745719e23
libX11 1.8.7
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-10-03 09:00:01 -07:00
Yair Mizrahi
7916869d16 CVE-2023-43787: Integer overflow in XCreateImage() leading to a heap overflow
When the format is `Pixmap` it calculates the size of the image data as:
    ROUNDUP((bits_per_pixel * width), image->bitmap_pad);
There is no validation on the `width` of the image, and so this
calculation exceeds the capacity of a 4-byte integer, causing an overflow.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-09-22 15:15:34 -07:00
Alan Coopersmith
b4031fc023 XCreatePixmap: trigger BadValue error for out-of-range dimensions
The CreatePixmap request specifies height & width of the image as CARD16
(unsigned 16-bit integer), so if either is larger than that, set it to 0
so the X server returns a BadValue error as the protocol requires.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-09-22 15:12:38 -07:00
Alan Coopersmith
73a37d5f2f XPutImage: clip images to maximum height & width allowed by protocol
The PutImage request specifies height & width of the image as CARD16
(unsigned 16-bit integer), same as the maximum dimensions of an X11
Drawable, which the image is being copied to.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-09-22 15:12:38 -07:00
Alan Coopersmith
204c3393c4 CVE-2023-43786: stack exhaustion from infinite recursion in PutSubImage()
When splitting a single line of pixels into chunks to send to the
X server, be sure to take into account the number of bits per pixel,
so we don't just loop forever trying to send more pixels than fit in
the given request size and not breaking them down into a small enough
chunk to fix.

Fixes: "almost complete rewrite" (Dec. 12, 1987) from X11R2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-09-22 15:12:03 -07:00
Alan Coopersmith
6858d468d9 CVE-2023-43785: out-of-bounds memory access in _XkbReadKeySyms()
Make sure we allocate enough memory in the first place, and
also handle error returns from _XkbReadBufferCopyKeySyms() when
it detects out-of-bounds issues.

Reported-by: Gregory James DUCK <gjduck@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-09-22 14:50:34 -07:00
Alan Coopersmith
78b37accff XOpenDisplay: ensure each screen has a valid root_visual pointer
Other code assumes this pointer cannot be NULL, so fail the connection
if a bug has caused the X server to give a non-existent visual ID for
the default visual of any screen.

Reported-by: Gregory James DUCK <gjduck@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-09-17 10:11:02 -07:00
Antti Savolainen
3962080b78 Add two compose sequences for dagger/obelisk symbols
The dagger symbol has several modern uses such as marking someone as
dead or something as extinct. Historically it has been used to indicate
a footnote.
2023-09-09 13:53:16 +00:00
Christopher Chavez
15bbc81cf6 Xutil.h: use Bool for XEmptyRegion(), XEqualRegion() 2023-08-29 22:50:39 +00:00
Benno Schulenberg
5433cb9351 nls: add two compose sequences for currency symbol ฿ (the Thai baht)
The compose sequences are obvious: the capital B plus the vertical bar.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-08-29 21:04:34 +00:00
Benno Schulenberg
2ff401a472 nls: reshuffle the compose sequences for currencies into ascending order
That is: sort them according to code point.
2023-08-29 21:04:34 +00:00
Benno Schulenberg
c0e2d42d41 nls: add compose sequences for (guaraní), (kip), and (tugrik)
When Ghana, Nigeria, Costa Rica and El Salvador have compose sequences
for their currency symbols (cedi: `₵`, naira: `₦`, colón: `₡`), then
Paraguay, Laos, and Mongolia deserve to have such sequences as well.

The sequences should be obvious: the relevant capital letter of the
name of the currency (G, K, T) plus a vertical bar, a minus sign,
and an equals sign, respectively.

Also add two sequences for `$` (the dollar sign), for consistency.

Drop the tentative comments for drachma, penny, and austral, as those
currencies have been obsolete for more than twenty years.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-08-29 21:04:34 +00:00
Benno Schulenberg
d9fe5dc735 nls: change result of sequence <C> <bar> from ¢ (CENT) to (CEDI)
As a cent is a small coin, it makes no sense to use an uppercase letter
to compose the `¢` symbol -- having four sequences with a lowercase `c`
plus a `bar` or a `slash` available for composing `¢` should be enough.

Use the sequence `<C> <bar` (with the uppercase `C`) for composing `₵`
(the CEDI SIGN) instead.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-08-29 21:04:34 +00:00
Antti Savolainen
031e63060e nls: add a compose sequence with double dead_tilde for ≈ (almost equal to)
Some keyboards lack direct asciitilde and instead have only dead tilde.
This compose sequence allows those keyboards to type the almost equal
to sign.
2023-08-27 06:33:53 +00:00
Benno Schulenberg
df2a18c464 nls: delete twenty seven untypable Greek compose sequences
Only a few keyboard layouts contain the `dead_iota` keysym, and none
of those layouts contains the `acute` keysym, so compose sequences
that combine the two symbols cannot be typed and are thus useless.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-08-25 17:15:41 +00:00
Alan Coopersmith
44f908d928 docs: fix names for XkbKeyKeyType & XkbKeyKeyTypeIndex
Implementation had "Key" twice in these macro names,
but the docs had only listed it once.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-08-20 15:27:48 -07:00
Alan Coopersmith
7b16c55063 docs: remove XkbKeySymsOffset
This function was documented but never implemented.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-08-20 15:27:48 -07:00
Alan Coopersmith
41a157dfee docs: remove XkbGetNameChanges
This function was documented but never implemented.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-08-20 15:27:48 -07:00
Alan Coopersmith
3442a8cee2 docs: remove XkbChangeIndicators and Xkb{Get,Note}IndicatorChanges
These functions were documented but never implemented.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-08-20 15:27:13 -07:00
Alan Coopersmith
b7a15d6c6e docs: XkbSAActionSetCtrls is really named XkbActionSetCtrls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-08-20 14:31:20 -07:00
Alan Coopersmith
a1d8dd7267 docs: remove XkbGetStickyKeysOptions & XkbSetStickyKeysOptions
These functions were documented but never implemented.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-08-20 14:18:32 -07:00
Alan Coopersmith
bf13f19740 docs: remove XkbGetSlowKeysDelay & XkbSetSlowKeysDelay
These functions were documented but never implemented.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-08-20 14:09:35 -07:00
Alan Coopersmith
caab7321d2 docs: remove XkbGetAccessXTimeout & XkbSetAccessXTimeout
These functions were documented but never implemented.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-08-20 14:04:15 -07:00
Alan Coopersmith
843e89bd24 docs: remove XkbAllocDeviceLedInfo
This function was documented but never implemented.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-08-20 12:58:47 -07:00
Alan Coopersmith
2686dd7a9d docs: finish removing XkbGetBounceKeysDelay & XkbSetBounceKeysDelay
These functions were documented but never implemented.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-08-20 12:41:42 -07:00
G. Branden Robinson
188991fe7e configure script reports stray, confusing "yes"
Closes issue #194

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-08-19 12:54:26 -07:00