summaryrefslogtreecommitdiff
path: root/src/cairo-path-fixed.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2017-07-08 09:28:03 +0930
committerBryce Harrington <bryce@osg.samsung.com>2018-05-07 16:35:51 -0700
commit199823938780c8e50099b627d3e9137acba7a263 (patch)
tree858c70f2a9c116ed2a5ffcb05cd9d8d3fe18a4cb /src/cairo-path-fixed.c
parent7554822dd0b52d33ec7898e81b59e97164b00142 (diff)
downloadcairo-199823938780c8e50099b627d3e9137acba7a263.tar.gz
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>
Diffstat (limited to 'src/cairo-path-fixed.c')
-rw-r--r--src/cairo-path-fixed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c
index ac44bb71b..9e9166cbd 100644
--- a/src/cairo-path-fixed.c
+++ b/src/cairo-path-fixed.c
@@ -325,7 +325,7 @@ _cairo_path_fixed_create (void)
{
cairo_path_fixed_t *path;
- path = malloc (sizeof (cairo_path_fixed_t));
+ path = _cairo_malloc (sizeof (cairo_path_fixed_t));
if (!path) {
_cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
return NULL;