mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-21 18:51:34 +01:00
image: Compare against the true size of the embedded buffer
When querying whether the run is small enough to fit inside the pre-allocated temporary buffer, we need to avoid comparing against sizeof(buf) as buf is a variable length array and so sizeof() is meaningless. Reported-by: Edward Zimmermann <Edward.Zimmermann@cib.de> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
fb1abbc4bc
commit
e7e1ac235f
1 changed files with 1 additions and 1 deletions
|
|
@ -2993,7 +2993,7 @@ span_renderer_init (cairo_abstract_span_renderer_t *_r,
|
|||
|
||||
r->u.mask.extents = composite->unbounded;
|
||||
r->u.mask.stride = (r->u.mask.extents.width + 3) & ~3;
|
||||
if (r->u.mask.extents.height * r->u.mask.stride > (int)sizeof (r->_buf)) {
|
||||
if (r->u.mask.extents.height * r->u.mask.stride > SZ_BUF) {
|
||||
r->mask = pixman_image_create_bits (PIXMAN_a8,
|
||||
r->u.mask.extents.width,
|
||||
r->u.mask.extents.height,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue