mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 07:21:06 +01:00
Fix hang in OOM situations
Fixes https://github.com/behdad/harfbuzz/issues/161
This commit is contained in:
1 parent
f92bd86cc8
commit
f0599db761
1 file changed
+5
-1
@@ -174,7 +174,11 @@ struct hb_buffer_t {
|
||||
if (have_output)
|
||||
{
|
||||
if (unlikely (out_info != info || out_len != idx)) {
|
||||
if (unlikely (!make_room_for (1, 1))) return;
|
||||
if (unlikely (!make_room_for (1, 1)))
|
||||
{
|
||||
idx++; // So we don't hang indefinitely...
|
||||
return;
|
||||
}
|
||||
out_info[out_len] = info[idx];
|
||||
}
|
||||
out_len++;
|
||||
|
||||
Reference in new issue
Block a user