From 290063c64398ebdd0aafb2d30bc96953be5f15e5 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 28 Jul 2025 03:18:44 -0600 Subject: [PATCH] [face] Fix a potential crasher if not enough font data In hb_face_count(). Fixes https://github.com/memononen/Skribidi/pull/67 --- src/hb-face.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hb-face.cc b/src/hb-face.cc index 3a5045109..b0cc787d0 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -84,8 +84,7 @@ hb_face_count (hb_blob_t *blob) hb_sanitize_context_t c (blob); - const char *start = hb_blob_get_data (blob, nullptr); - auto *ot = reinterpret_cast (const_cast (start)); + auto *ot = blob->as (); if (unlikely (!ot->sanitize (&c))) return 0;