[myanmar] Fix unsafe usage of FLAG_SAFE()
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 19 Oct 2017 18:35:51 +0000 (11:35 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 19 Oct 2017 18:35:51 +0000 (11:35 -0700)
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

index 8b8e417..f446fe6 100644 (file)
@@ -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