diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2017-07-08 09:28:03 +0930 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2018-05-07 16:35:51 -0700 |
commit | 199823938780c8e50099b627d3e9137acba7a263 (patch) | |
tree | 858c70f2a9c116ed2a5ffcb05cd9d8d3fe18a4cb /src/cairo-base64-stream.c | |
parent | 7554822dd0b52d33ec7898e81b59e97164b00142 (diff) | |
download | cairo-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-base64-stream.c')
-rw-r--r-- | src/cairo-base64-stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-base64-stream.c b/src/cairo-base64-stream.c index 636431372..6352545f7 100644 --- a/src/cairo-base64-stream.c +++ b/src/cairo-base64-stream.c @@ -125,7 +125,7 @@ _cairo_base64_stream_create (cairo_output_stream_t *output) if (output->status) return _cairo_output_stream_create_in_error (output->status); - stream = malloc (sizeof (cairo_base64_stream_t)); + stream = _cairo_malloc (sizeof (cairo_base64_stream_t)); if (unlikely (stream == NULL)) { _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); return (cairo_output_stream_t *) &_cairo_output_stream_nil; |