From f4fe9baefdb7e0ff9946f88b6f4b55738fa30cdf Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 25 Jul 2014 11:39:55 -0400 Subject: [PATCH] Reject tags longer than 4 chars in hb_feature_from_string() --- src/hb-shape.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-shape.cc b/src/hb-shape.cc index c1b752405..a63a5c1e0 100644 --- a/src/hb-shape.cc +++ b/src/hb-shape.cc @@ -104,7 +104,7 @@ parse_feature_tag (const char **pp, const char *end, hb_feature_t *feature) (*pp)++; #undef ISALNUM - if (p == *pp) + if (p == *pp || *pp - p > 4) return false; feature->tag = hb_tag_from_string (p, *pp - p);