Merge branch 'depth-mask-ub' into 'master'

cairo-xcb-connection.c: fix undefined behavior in DEPTH_MASK

See merge request cairo/cairo!604
This commit is contained in:
Uli Schlachter 2025-01-13 16:52:21 +00:00
commit 727966dfca

View file

@ -239,7 +239,7 @@ _cairo_xcb_connection_parse_xrender_formats (cairo_xcb_connection_t *connection,
/*
* We require support for depth 1, 8, 24 and 32 pixmaps
*/
#define DEPTH_MASK(d) (1 << ((d) - 1))
#define DEPTH_MASK(d) ((uint32_t)(1) << ((d) - 1))
#define REQUIRED_DEPTHS (DEPTH_MASK(1) | \
DEPTH_MASK(8) | \
DEPTH_MASK(24) | \