Commit graph

9 commits

Author SHA1 Message Date
Adrian Johnson
1998239387 Use _cairo_malloc instead of malloc
_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>
2018-05-07 16:35:51 -07:00
Chris Wilson
2ed484817e xlib/shm: Discard damage upon shm finish
Both to make sure we do not leak the memory, but to also prevent
_cairo_xlib_surface_put_shm() from operating upon the finished shm
surface after the display is closed.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58253
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08 16:07:32 +00:00
Chris Wilson
0bfd2acd35 xlib: Implement SHM fallbacks and fast upload paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-17 13:58:09 +01:00
Chris Wilson
d647d4f7db damage: Update tail pointer after allocating new chunk
Reported and based on a patch by fmot.fics

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53384
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-11 19:29:19 +01:00
Chris Wilson
9ecf2f7c4f damage: Prevent reducing an error object
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-10 21:01:36 +01:00
Chris Wilson
f4631dca37 damage: Prevent accumulating damage to an error object
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-10 21:00:49 +01:00
Chris Wilson
50e51389bd damage: Avoid freeing the NIL error object
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-10 20:58:33 +01:00
Chris Wilson
c504dba5a7 damage: Fix memcpy size
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-21 20:09:52 +00:00
Chris Wilson
8bea52bb0b Add preliminary damage tracking
This is initially based around the requirements for handling internal
fallbacks to the image compositor and reducing the number of pixels
required to be transferred.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-15 14:21:00 +00:00