Skip to content

Fix memory leak in type3 glyph surface

Uli Schlachter requested to merge psychon/cairo:clipper-memory-leak into master

In _cairo_type3_glyph_surface_create(), we call _cairo_surface_clipper_init(), but nothing ever called _cairo_surface_clipper_reset() in this call. This commit adds that missing call.

This fixes a leak of a clip.

Since I have no clue about this code (does _cairo_pdf_operators_fini() possible use the clipper?), I did the patch like this. This should avoid any possibility for a use-after-free.

Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51043 Signed-off-by: Uli Schlachter psychon@znc.in

Merge request reports