Skip to content

Commit 63ef0b4

Browse files
committed
[ot-font] Fix hmtx wrong table length check
Discovered by libFuzzer. Ouch! #139 (comment)
1 parent 613e630 commit 63ef0b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/hb-ot-font.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct hb_ot_face_metrics_accelerator_t
5959

6060
this->blob = OT::Sanitizer<OT::_mtx>::sanitize (face->reference_table (_mtx_tag));
6161
if (unlikely (!this->num_advances ||
62-
2 * (this->num_advances + this->num_metrics) < hb_blob_get_length (this->blob)))
62+
2 * (this->num_advances + this->num_metrics) > hb_blob_get_length (this->blob)))
6363
{
6464
this->num_metrics = this->num_advances = 0;
6565
hb_blob_destroy (this->blob);

0 commit comments

Comments
 (0)