| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
_cairo_malloc(0) always returns NULL, but has not been used
consistently. This patch replaces many calls to malloc() with
_cairo_malloc().
Fixes: fdo# 101547
CVE: CVE-2017-9814 Heap buffer overflow at cairo-truetype-subset.c:1299
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
|
|
|
|
|
|
|
| |
Otherwise we leave dangling pointers in the visual list, leading to
memory corruption when using low bitdepth servers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
| |
45665c0d48396af7bd653d546115a5f36cfa9ae1 breaks the build of
cairo-xlib-xcb because it does not disable the compilation of
cairo-xlib implementation files when cairo-xlib-xcb is enable. This
results in collisions when linking.
Reported-by: James Cloos <cloos@jhcloos.com>
|
|
|
|
|
|
| |
The screen is owned by the cairo_xlib_display_t device, so we can
simplify and close the refleak by removing the surplus reference
counting.
|
|
|
|
|
|
|
|
|
|
|
| |
I updated the Free Software Foundation address using the following script.
for i in $(git grep Temple | cut -d: -f1 )
do
sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
|
|
|
|
|
| |
A pending commit will want to include some utility code from cairo and
so we need to extricate the error handling from the PLT symbol hiding.
|
|
|
|
|
| |
Use the gcc likelihood annotation to indicate that allocation failures are
extremely unlikely.
|
|
|
|
|
|
|
|
| |
Remove the intermediate rgb333 for PseudoColor and work on the
cube directly. Also upgrade to a 6x6x6 cube instead of 5x5x5.
Do dithering on both PseudoColor and TrueColor, using a 4x4 pattern.
This only affects X servers with no XRender.
|
|
|
|
|
|
| |
That is, instead of uniformly spreading the colors at 0/4, 1/4, 2/4, 3/4, 4/4
intensities, we do 0/7, 1.5/7, 3.5/7, 5.5/7, 7/7 now. Those better
approximate the 0/7..7/7 of the rgb333 space that we first convert to.
|
|
|
|
|
| |
We convert to rgb333 before doing pseudo-color lookup, so we cannot
get more than 8 gray levels anyway.
|
|
|
|
|
|
| |
Tidy the error paths whilst handling visuals, in particular avoiding a
couple of potential NULL deferences, missed status checks and fresh
leaks.
|
| |
|
|
This support involves allocating a 16-bit grayscale ramp as well
as a 5x5x5 RGB color cube. Afterwards, the 256 colors are queried
and an array is generated mapping from r3g3b3 colors to the closest
available color. Both the queried colors and the reverse mapping
are stored in a new visual-specific cairo_xlib_visual_info_t
structure which hangs off of the cairo_xlib_screen_info_t.
Both the color-cube allocation and the distance metric could be
improved by someone sufficiently motivated, (for example, allocating
and matching in a perceptually linear color space rather than just
in RGB space). Also, making this work well in the face of a changing
color map, or in the case of GrayScale, StaticGray, or DirectColor
visuals are left entirely as exercises for the reader. StaticColor
support should be fine as is, but is entirely untested.
|