From 7cf84272f0093cce127dcbe381ed90490b4eeb42 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 15 Mar 2024 20:45:31 -0600 Subject: [PATCH] [varc] Fix sanitize for HBUINT32VAR --- src/hb-open-type.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index 98038ae15..9844b22d0 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -167,7 +167,9 @@ struct HBUINT32VAR bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - return_trace (c->check_range (v, 1) && c->check_struct (this)); + return_trace (c->check_range (v, 1) && + hb_barrier () && + c->check_range (v, get_size ())); } operator unsigned () const