[ENOMEM] Fix failure to check calloc return.
Fixes https://oss-fuzz.com/testcase-detail/6246465148813312.
This commit is contained in:
parent
d307c24abf
commit
4ba8e3c6fd
|
@ -215,6 +215,8 @@ struct name
|
|||
this->count = it.len ();
|
||||
|
||||
NameRecord *name_records = (NameRecord *) calloc (it.len (), NameRecord::static_size);
|
||||
if (unlikely (!name_records)) return_trace (false);
|
||||
|
||||
hb_array_t<NameRecord> records (name_records, it.len ());
|
||||
|
||||
for (const NameRecord& record : it)
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue