[array] Use hb_memcmp instead of memcmp
Fixes ubsan error.
diff --git a/src/hb-array.hh b/src/hb-array.hh
index c7960da..1963698 100644
--- a/src/hb-array.hh
+++ b/src/hb-array.hh
@@ -416,13 +416,13 @@
inline bool hb_array_t<const char>::operator == (const hb_array_t<const char> &o) const
{
if (o.length != this->length) return false;
- return 0 == memcmp (arrayZ, o.arrayZ, length);
+ return 0 == hb_memcmp (arrayZ, o.arrayZ, length);
}
template <>
inline bool hb_array_t<const unsigned char>::operator == (const hb_array_t<const unsigned char> &o) const
{
if (o.length != this->length) return false;
- return 0 == memcmp (arrayZ, o.arrayZ, length);
+ return 0 == hb_memcmp (arrayZ, o.arrayZ, length);
}
template <>