From 0744149cdabd85d632822ff810d3994787bca4b7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 2 Dec 2017 15:06:15 -0800 Subject: [PATCH] [set] Protect against bad input in hb_set_add_range() --- src/hb-set-private.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-set-private.hh b/src/hb-set-private.hh index a47b17a3..2b459756 100644 --- a/src/hb-set-private.hh +++ b/src/hb-set-private.hh @@ -217,7 +217,7 @@ struct hb_set_t } inline void add_range (hb_codepoint_t a, hb_codepoint_t b) { - if (unlikely (in_error)) return; + if (unlikely (in_error || a > b)) return; unsigned int ma = get_major (a); unsigned int mb = get_major (b); if (ma == mb) -- GitLab