C interface to the X Window System protocol, which replaces the traditional Xlib interface.
Go to file
Ilya Pominov 038636786a c_client: Fix crash in xcb_randr_set_monitor
Take into account c_need_sizeof when evaluating
xcb_protocol_request_t.count

Incorrect xcb_protocol_request_t.count causes a segmentation fault when
calling functions:
- xcb_randr_set_monitor{_checked}
- xcb_input_change_feedback_control{_checked}
- xcb_input_change_device_control{_unchecked}

Steps to reproduce:
Call xcb_randr_set_monitor() with valid arguments

OBSERVED RESULT
Segmentation fault
```
Process terminating with default action of signal 11 (SIGSEGV)
  Access not within mapped region at address 0x780
    at 0x4852925: memmove (in /usr/libexec/valgrind/vgpreload_memcheck-
amd64-linux.so)
    by 0x486967C: memcpy (string_fortified.h:29)
    by 0x486967C: send_request (xcb_out.c:59)
    by 0x486967C: send_request (xcb_out.c:46)
    by 0x486967C: xcb_send_request_with_fds64 (xcb_out.c:338)
    by 0x48699FC: xcb_send_request (xcb_out.c:359)
    by 0x4891F11: xcb_randr_set_monitor_checked (randr.c:5350)
```

EXPECTED RESULT
Function returns cookie

Amend: 77b594f958

Signed-off-by: Ilya Pominov <ipominov@astralinux.ru>
2023-04-10 20:06:52 +03:00
doc Improve tutorial example 2022-09-28 22:39:32 +00:00
m4 config: issue an error if DRI3 is requested, but sendfds is not available 2014-08-06 13:26:08 +02:00
man Escape \n to display properly in xcb-requests man page 2015-04-29 23:23:05 -07:00
src c_client: Fix crash in xcb_randr_set_monitor 2023-04-10 20:06:52 +03:00
tests Add tests for unix socket parsing 2023-03-25 15:27:50 -04:00
tools Match only XCB-namespaced XID generators when converting to xcb_generate_id. 2006-10-15 12:34:30 -07:00
.autom4te.cfg Use build-aux as autom4te cache directory 2013-08-15 00:35:07 +02:00
.gitignore gitignore: add files generated by make check 2020-11-18 23:06:32 -05:00
.gitlab-ci.yml gitlab CI: add a basic build test 2022-07-18 17:55:43 -07:00
COPYING Fix the year in COPYING. 2006-04-27 17:32:20 -07:00
Makefile.am Build DOUBLE-BUFFER extension. 2022-06-02 13:27:48 -04:00
NEWS Release libxcb 1.14 2020-02-22 12:20:08 -08:00
README.md Update README for gitlab migration 2019-02-16 13:41:28 -08:00
autogen.sh autogen: add default patch prefix 2022-07-24 14:26:03 -07:00
check-pc-requires Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
configure.ac Allow full paths to sockets on non-macOS 2023-03-25 13:15:08 -04:00
xcb-composite.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-damage.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-dbe.pc.in Build DOUBLE-BUFFER extension. 2022-06-02 13:27:48 -04:00
xcb-dpms.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-dri2.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-dri3.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-ge.pc.in optionally build the GE extension 2017-03-11 10:51:33 +01:00
xcb-glx.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-present.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-randr.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-record.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-render.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-res.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-screensaver.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-shape.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-shm.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-sync.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xevie.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xf86dri.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xfixes.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xinerama.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xinput.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xkb.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xprint.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xselinux.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xtest.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xv.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xvmc.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb.pc.in Store xcbproto version libxcb was compiled with 2009-05-25 12:20:23 +02:00

About libxcb

libxcb provides an interface to the X Window System protocol, which replaces the traditional Xlib interface. It has several advantages over Xlib, including:

  • size: small, simple library, and lower memory footprint
  • latency hiding: batch several requests and wait for the replies later
  • direct protocol access: interface and protocol correspond exactly
  • proven thread support: transparently access XCB from multiple threads
  • easy extension implementation: interfaces auto-generated from XML-XCB

Xlib also uses XCB as a transport layer, allowing software to make requests and receive responses with both, which eases porting to XCB. However, client programs, libraries, and toolkits will gain the most benefit from a native XCB port.

More information about xcb is available from our website:

https://xcb.freedesktop.org/

Please report any issues you find to the freedesktop.org bug tracker at:

https://gitlab.freedesktop.org/xorg/lib/libxcb/issues

Discussion about XCB occurs on the XCB mailing list:

https://lists.freedesktop.org/mailman/listinfo/xcb

You can obtain the latest development versions of XCB using GIT from the libxcb code repository at:

https://gitlab.freedesktop.org/xorg/lib/libxcb

For anonymous checkouts, use:

git clone https://gitlab.freedesktop.org/xorg/lib/libxcb.git

For developers, use:

git clone git@gitlab.freedesktop.org:xorg/lib/libxcb.git