[buffer] Fix out-buffer under memory-alloc failure

This was broken in July refactoring of the buffer, and exposed to
ReverseChainSingleSubstFormat1 in 3807061d63

Fixes:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38800
https://bugs.chromium.org/p/chromium/issues/detail?id=1303552
This commit is contained in:
Behdad Esfahbod 2022-03-21 18:06:33 -06:00
parent 116cc69236
commit 03085132ba
2 changed files with 1 additions and 0 deletions

View File

@ -404,6 +404,7 @@ hb_buffer_t::sync ()
reset: reset:
have_output = false; have_output = false;
out_info = info;
out_len = 0; out_len = 0;
idx = 0; idx = 0;
} }