From 2ccfe84eff7f72159c87012d7e10e9c8ecdbc956 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 9 May 2022 15:35:04 -0600 Subject: [PATCH] [cff-common] Add assert to INDEX::set_offset_at() --- src/hb-ot-cff-common.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hb-ot-cff-common.hh b/src/hb-ot-cff-common.hh index 6dde482bb..a882dba5e 100644 --- a/src/hb-ot-cff-common.hh +++ b/src/hb-ot-cff-common.hh @@ -223,6 +223,7 @@ struct CFFIndex void set_offset_at (unsigned int index, unsigned int offset) { + assert (index <= count); HBUINT8 *p = offsets + offSize * index + offSize; unsigned int size = offSize; for (; size; size--)