Closed grzkv closed 1 year ago
Looks like cairo.ImageSurfaceCreate can be called with the image size larger than the one allowed. The maximum can be looked up e.g. here https://github.com/ImageMagick/cairo/blob/main/src/cairo-image-surface.c#L62 It's also mentioned in the mailing lists https://cairo.cairographics.narkive.com/Mkjwvkep/32k-limit-with-image-surface The lists are old, but seems like the limitation is still in place.
cairo.ImageSurfaceCreate
Added a check.
What issue is this change attempting to solve?
Looks like
cairo.ImageSurfaceCreate
can be called with the image size larger than the one allowed. The maximum can be looked up e.g. here https://github.com/ImageMagick/cairo/blob/main/src/cairo-image-surface.c#L62 It's also mentioned in the mailing lists https://cairo.cairographics.narkive.com/Mkjwvkep/32k-limit-with-image-surface The lists are old, but seems like the limitation is still in place.How does this change solve the problem? Why is this the best approach?
Added a check.