Imported Upstream version 2.4.0
[platform/upstream/harfbuzz.git] / src / hb-ot-cff-common.hh
index c645953..61e615c 100644 (file)
@@ -525,6 +525,7 @@ struct FDArray : CFFIndexOf<COUNT, FontDict>
     for (unsigned i = 0; i < fontDicts.length; i++)
       if (fdmap.includes (i))
       {
+       if (unlikely (fid >= fdCount)) return_trace (false);
        CFFIndexOf<COUNT, FontDict>::set_offset_at (fid++, offset);
        offset += FontDict::calculate_serialized_size (fontDicts[i], opszr);
       }