Skip to content

Commit f966649

Browse files
committed
Fix another memory access issue discovered by libFuzzer
Fixes #139 (comment)
1 parent c1a5dc4 commit f966649

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/hb-ot-layout-gpos-table.hh

+3-1
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ struct PairPosFormat1
704704
{
705705
TRACE_SANITIZE (this);
706706

707+
if (!c->check_struct (this)) return_trace (false);
708+
707709
unsigned int len1 = valueFormat1.get_len ();
708710
unsigned int len2 = valueFormat2.get_len ();
709711
PairSet::sanitize_closure_t closure = {
@@ -713,7 +715,7 @@ struct PairPosFormat1
713715
1 + len1 + len2
714716
};
715717

716-
return_trace (c->check_struct (this) && coverage.sanitize (c, this) && pairSet.sanitize (c, this, &closure));
718+
return_trace (coverage.sanitize (c, this) && pairSet.sanitize (c, this, &closure));
717719
}
718720

719721
protected:

0 commit comments

Comments
 (0)