From 975a5f919467c9bc4cad1340ebf07ae32bf07e14 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 20 May 2022 12:34:49 -0600 Subject: [PATCH] [array] Use hb_memcmp instead of memcmp Fixes ubsan error. --- src/hb-array.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-array.hh b/src/hb-array.hh index c7960dab7..1963698cf 100644 --- a/src/hb-array.hh +++ b/src/hb-array.hh @@ -416,13 +416,13 @@ template <> inline bool hb_array_t::operator == (const hb_array_t &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::operator == (const hb_array_t &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 <>