Test the value of msg_controllen for platforms whose CMSG_FIRSTHDR() does not test...
authorPHO <pho@cielonegro.org>
Tue, 3 Dec 2013 03:43:04 +0000 (12:43 +0900)
committerJulien Cristau <jcristau@debian.org>
Sat, 14 Dec 2013 04:46:57 +0000 (05:46 +0100)
commita1299eb2a210b5788a2b827b82a3d825caa1f201
tree6aa341ebd111d9c5bc99e03aad9f07c00641145e
parentb30b11ac49d934541312b03c41d1ab83047a59f4
Test the value of msg_controllen for platforms whose CMSG_FIRSTHDR() does not test it for us

As RFC 2292 points out, some platforms (e.g. Darwin 9.8.0) provide
CMSG_FIRSTHDR(msg) which just returns msg.msg_control without first
checking if msg.msg_controllen is non-zero. We need a workaround for
such platforms not to let _xcb_in_read() segfault.

https://bugs.freedesktop.org/show_bug.cgi?id=72253

Signed-off-by: Julien Cristau <jcristau@debian.org>
src/xcb_in.c