[cairo-commit] 2 commits - src/cairo-type1-subset.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jul 22 06:08:24 UTC 2023


 src/cairo-type1-subset.c |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 89f272e3d92d9045d7d39155c120d81b0b5a7961
Merge: 0560aa581 35da42b68
Author: Uli Schlachter <psychon at znc.in>
Date:   Sat Jul 22 06:08:22 2023 +0000

    Merge branch 'master' into 'master'
    
    fix SEGV in cairo_type1_font functioons
    
    See merge request cairo/cairo!497

commit 35da42b681ba883de7852ecde8bd55f0adc61708
Author: iasunsea <iasunsea at sina.com>
Date:   Sat Jul 22 00:50:27 2023 +0800

    fix SEGV in cairo_type1_font functioons

diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index 735c59e72..0388f374e 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -1085,6 +1085,9 @@ cairo_type1_font_for_each_subr (cairo_type1_font_subset_t  *font,
 
 	/* Skip binary data and | or NP token. */
 	p = skip_token (subr_string + subr_length, cleartext_end);
+        if (p == NULL)
+            return CAIRO_INT_STATUS_UNSUPPORTED;
+
 	while (p < cleartext_end && _cairo_isspace(*p))
 	    p++;
 
@@ -1248,6 +1251,9 @@ cairo_type1_font_subset_for_each_glyph (cairo_type1_font_subset_t *font,
 
 	/* Skip binary data and |- or ND token. */
 	p = skip_token (charstring + charstring_length, dict_end);
+        if (p == NULL)
+            return CAIRO_INT_STATUS_UNSUPPORTED;
+
 	while (p < dict_end && _cairo_isspace(*p))
 	    p++;
 


More information about the cairo-commit mailing list