From d8509061e6167a7132c7d4aa414df65d95703ee6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 4 Jan 2023 11:33:54 -0700 Subject: [PATCH] [vector] It's okay if shrinking fails --- src/hb-vector.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 5a0576fdb..7d2180077 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -391,6 +391,9 @@ struct hb_vector_t if (unlikely (new_allocated && !new_array)) { + if (exact and new_allocated == length) + return true; // shrinking failed; it's okay; happens in our fuzzer + allocated = -1; return false; }