From 317e3693da558087ab92d2c896be463311e737d6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 20 Apr 2023 11:48:43 -0600 Subject: [PATCH] [beyond-64k] Fail hmtx subsetting if subset too large --- src/hb-ot-hmtx-table.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh index 16eb1eb91..53a3e2f83 100644 --- a/src/hb-ot-hmtx-table.hh +++ b/src/hb-ot-hmtx-table.hh @@ -92,7 +92,7 @@ struct hmtxvmtx unsigned int length; H *table = (H *) hb_blob_get_data (dest_blob, &length); - table->numberOfLongMetrics = num_hmetrics; + c->serializer->check_assign (table->numberOfLongMetrics, num_hmetrics, HB_SERIALIZE_ERROR_INT_OVERFLOW); #ifndef HB_NO_VAR if (c->plan->normalized_coords)