mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 09:34:05 +01:00
[cmap] malloc fail test (#5710)
Fixes https://github.com/harfbuzz/harfbuzz/security/advisories/GHSA-xvjr-f2r9-c7ww
This commit is contained in:
1 parent
fa2908bf16
commit
1265ff8d99
1 file changed
+4
@@ -1670,6 +1670,10 @@ struct SubtableUnicodesCache {
|
||||
{
|
||||
SubtableUnicodesCache* cache =
|
||||
(SubtableUnicodesCache*) hb_malloc (sizeof(SubtableUnicodesCache));
|
||||
|
||||
if (unlikely (!cache))
|
||||
return nullptr;
|
||||
|
||||
new (cache) SubtableUnicodesCache (source_table);
|
||||
return cache;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user