Summary: | cairo-matrix: invalid matrix created in _cairo_matrix_to_pixman_matrix_offset() | ||
---|---|---|---|
Product: | cairo | Reporter: | André Draszik <bfo> |
Component: | general | Assignee: | Chris Wilson <chris> |
Status: | RESOLVED MOVED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 1.12.16 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | test case |
output from running the program:
> matrix orig: xx/yx/xy/yy/x0/y0 38.835275 5.900283 310.889941 43.796450 266.442591 242.525857
> matrix new : xx/yx/xy/yy/x0/y0 38.835275 5.900283 310.889941 43.796450 85337.941552 12416.642356
> offset x/y: 267/-242
85337 > PIXMAN_MAX_INT (and _cairo_matrix_to_pixman_matrix() subsequently will return CAIRO_STATUS_INVALID_MATRIX), although all the input values are < PIXMAN_MAX_INT
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/199. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 109340 [details] test case The attached test is a copy of the code in _cairo_matrix_to_pixman_matrix_offset() Using the embedded values for the matrix, the cairo code converts this into a pixman_transform_t which can not be handled by pixman, due to 16 bit overflow. I believe this particular matrix doesn't need any translation, as all values fit nicely into 16 bit from the start for pixman. The end-result is that the drawing operation fails, although it need not. Not sure what the correct fix is, it could either check whether the matrix as passed in needs any modification for pixman, or it could check whether a smallest maximum norm was found before applying the matrix tranlation.