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:
|
||
---|---|---|
doc | ||
m4 | ||
man | ||
src | ||
tests | ||
tools | ||
.autom4te.cfg | ||
.gitignore | ||
.gitlab-ci.yml | ||
COPYING | ||
Makefile.am | ||
NEWS | ||
README.md | ||
autogen.sh | ||
check-pc-requires | ||
configure.ac | ||
xcb-composite.pc.in | ||
xcb-damage.pc.in | ||
xcb-dbe.pc.in | ||
xcb-dpms.pc.in | ||
xcb-dri2.pc.in | ||
xcb-dri3.pc.in | ||
xcb-ge.pc.in | ||
xcb-glx.pc.in | ||
xcb-present.pc.in | ||
xcb-randr.pc.in | ||
xcb-record.pc.in | ||
xcb-render.pc.in | ||
xcb-res.pc.in | ||
xcb-screensaver.pc.in | ||
xcb-shape.pc.in | ||
xcb-shm.pc.in | ||
xcb-sync.pc.in | ||
xcb-xevie.pc.in | ||
xcb-xf86dri.pc.in | ||
xcb-xfixes.pc.in | ||
xcb-xinerama.pc.in | ||
xcb-xinput.pc.in | ||
xcb-xkb.pc.in | ||
xcb-xprint.pc.in | ||
xcb-xselinux.pc.in | ||
xcb-xtest.pc.in | ||
xcb-xv.pc.in | ||
xcb-xvmc.pc.in | ||
xcb.pc.in |
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:
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