mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 19:18:12 +02:00
Add array bounds check for xrender format lookup
Before this change, images with RGB30, RGB96F, and RGBA128F formats would have been given garbage xrender formats; now such images use the fallback path and are converted to formats with an xrender equivalent.
This commit is contained in:
parent
08194cef53
commit
39179681d4
1 changed files with 2 additions and 1 deletions
|
|
@ -1266,7 +1266,8 @@ _cairo_xcb_surface_picture (cairo_xcb_surface_t *target,
|
|||
if (unlikely (status))
|
||||
return (cairo_xcb_picture_t *) _cairo_surface_create_in_error (status);
|
||||
|
||||
if (image->format != CAIRO_FORMAT_INVALID) {
|
||||
if (image->format != CAIRO_FORMAT_INVALID &&
|
||||
image->format < ARRAY_LENGTH (target->screen->connection->standard_formats)) {
|
||||
xcb_render_pictformat_t format;
|
||||
|
||||
format = target->screen->connection->standard_formats[image->format];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue