From 7c561dacc3c5fb9306db8bda27b7289331bd523f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 19 Oct 2017 11:35:51 -0700 Subject: [PATCH] [myanmar] Fix unsafe usage of FLAG_SAFE() The commit f559c633073f63b9d87cb2440048b4413cfa1c05 caused "undefined-shift" errors in Myanmar shaper as we changed the numeric value of type D from 19 to 32 there, making the "FLAG_SAFE (info.myanmar_category())" wrong. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3546 --- src/hb-ot-shape-complex-myanmar.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-shape-complex-myanmar.cc b/src/hb-ot-shape-complex-myanmar.cc index 8b8e41723..f446fe625 100644 --- a/src/hb-ot-shape-complex-myanmar.cc +++ b/src/hb-ot-shape-complex-myanmar.cc @@ -154,7 +154,7 @@ is_one_of (const hb_glyph_info_t &info, unsigned int flags) { /* If it ligated, all bets are off. */ if (_hb_glyph_info_ligated (&info)) return false; - return !!(FLAG_SAFE (info.myanmar_category()) & flags); + return !!(FLAG_UNSAFE (info.myanmar_category()) & flags); } static inline bool