[set] Protect against bad input in hb_set_add_range()

This commit is contained in:
Behdad Esfahbod 2017-12-02 15:06:15 -08:00
parent d5e29303db
commit 0744149cda
1 changed files with 1 additions and 1 deletions

View File

@ -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)