summaryrefslogtreecommitdiff
path: root/src/xcb_out.c
diff options
context:
space:
mode:
authorDaniel Martin <consume.noise@gmail.com>2013-11-22 23:27:28 +0100
committerJulien Cristau <jcristau@debian.org>2013-12-12 20:37:47 +0100
commit18f0afab3f0de68114fe185e89d8b25a8c072a2c (patch)
treec13fb85d7ebecac9948e750ae67b47894f8ca6b4 /src/xcb_out.c
parent5d1dbb468bb0f834eaa8adea6daf6729808ca429 (diff)
c_client.py: Fix _sizeof() functions
Currently, it is not possible to correctly iterate over the replies of some requests. For example, the list of XIDeviceInfo returned by the XIQueryDevice request from xinput2 is read as garbage starting from the second entry. The culprits are the _sizeof() used by the iterators. In the above case: int xcb_input_xi_device_info_sizeof (const void *_buffer /**< */) { char *xcb_tmp = (char *)_buffer; [...] unsigned int xcb_block_len = 0; [...] xcb_block_len += sizeof(xcb_input_xi_device_info_t); xcb_tmp += xcb_block_len; /* name */ xcb_block_len += (((_aux->name_len + 3) / 4) * 4) * sizeof(char); xcb_tmp += xcb_block_len; [...] } The problem here is that `xcb_block_len` is not zero'd right above the `/* name */` comment, causing `xcb_tmp` to be incremented by `sizeof(xcb_input_xi_device_info_t)` twice. The returned size is too large. https://bugs.freedesktop.org/show_bug.cgi?id=68387 Tested-by: Ran Benita <ran234@gmail.com> Reviewed-by: Ran Benita <ran234@gmail.com> Reviewed-by: Daniel Martin <consume.noise@gmail.com> Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: Julien Cristau <jcristau@debian.org>
Diffstat (limited to 'src/xcb_out.c')
0 files changed, 0 insertions, 0 deletions