compositor: Verify that the maximum number of outputs is not exceeded
authorBryce Harrington <bryce@osg.samsung.com>
Thu, 24 Dec 2015 04:53:53 +0000 (20:53 -0800)
committerBryce Harrington <bryce@osg.samsung.com>
Tue, 12 Jan 2016 19:40:38 +0000 (11:40 -0800)
commit18e4573cea99fc95aad12b14350bd90c39b9682b
treef99ba5fa8ae4a85e68edc300068ed3683a8328c7
parent3f650b8c58d9b2815727f412b6e3bc5f444e814e
compositor: Verify that the maximum number of outputs is not exceeded

output_id_pool is defined as a uint32_t, thus ffs() provides a range of
1-32 available id numbers.  When the 33rd output is enabled, Weston will
set the ID to (unsigned)(-1) and thus lead to some unexpected
behaviors.

I'm not sure what the best way to handle this error would be since this
is in an initialization routine, but at least let's document the
potential error condition with an assert().
src/compositor.c