libweston: Fix integer underflow in weston_layer_mask_is_infinite
authorAdam Jackson <ajax@redhat.com>
Wed, 16 Oct 2019 20:02:59 +0000 (16:02 -0400)
committerAdam Jackson <ajax@redhat.com>
Wed, 16 Oct 2019 20:02:59 +0000 (16:02 -0400)
commit3c3f3b1cc3c30c646795668662c3234656135cd2
treeeea5d10b39280b30cdc04e0418c5f59fe983683d
parent267b16e8f44133aa2fc09a93a73c04f47287fbea
libweston: Fix integer underflow in weston_layer_mask_is_infinite

ubsan doesn't like what we were doing here:

../libweston/compositor.c:3021:21: runtime error: signed integer overflow: -2147483648 + -1 cannot be represented in type 'int'

Rather than try to be clever in invoking weston_layer_set_mask, just build the
maximal mask explicitly.
libweston/compositor.c