mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-26 09:21:06 +01:00
[ClassDef] Fix a fuzzer issue
Don't qsort an array that failed to allocate! Fixes https://oss-fuzz.com/testcase-detail/6512559172485120
This commit is contained in:
1 parent
cda646a598
commit
86658df5d2
1 file changed
+2
@@ -1804,6 +1804,8 @@ struct ClassDefFormat2_4
|
||||
prev_gid = cur_gid;
|
||||
}
|
||||
|
||||
if (unlikely (c->in_error ())) return_trace (false);
|
||||
|
||||
if (likely (record)) record->last = prev_gid;
|
||||
rangeRecord.len = num_ranges;
|
||||
rangeRecord.as_array ().qsort (RangeRecord<Types>::cmp_range); // To handle unsorted glyph order.
|
||||
|
||||
Reference in new issue
Block a user