summaryrefslogtreecommitdiff
path: root/mupdf/CVE-2017-14685.patch
blob: a9365262565294f2297e0f4133278ccfedefa2f4 (plain)
    1 From ab1a420613dec93c686acbee2c165274e922f82a Mon Sep 17 00:00:00 2001
    2 From: Tor Andersson <tor.andersson@artifex.com>
    3 Date: Tue, 19 Sep 2017 15:23:04 +0200
    4 Subject: [PATCH] Fix 698539: Don't use xps font if it could not be loaded.
    5 
    6 xps_load_links_in_glyphs did not cope with font loading failures.
    7 ---
    8  source/xps/xps-link.c | 2 ++
    9  1 file changed, 2 insertions(+)
   10 
   11 diff --git a/source/xps/xps-link.c b/source/xps/xps-link.c
   12 index c07e0d7..c26a8d9 100644
   13 --- a/source/xps/xps-link.c
   14 +++ b/source/xps/xps-link.c
   15 @@ -91,6 +91,8 @@ xps_load_links_in_glyphs(fz_context *ctx, xps_document *doc, const fz_matrix *ct
   16  			bidi_level = atoi(bidi_level_att);
   17  
   18  		font = xps_lookup_font(ctx, doc, base_uri, font_uri_att, style_att);
   19 +		if (!font)
   20 +			return;
   21  		text = xps_parse_glyphs_imp(ctx, doc, &local_ctm, font, fz_atof(font_size_att),
   22  				fz_atof(origin_x_att), fz_atof(origin_y_att),
   23  				is_sideways, bidi_level, indices_att, unicode_att);
   24 -- 
   25 2.9.1

Generated by cgit