commit | 73b8360dcfb57eaa9acffc7967015a113421eeda | [log] [tgz] |
---|---|---|
author | Garret Rieger <[email protected]> | Thu May 19 22:59:51 2022 +0000 |
committer | Behdad Esfahbod <[email protected]> | Thu May 19 17:02:34 2022 -0600 |
tree | f17ebe9edfbb0c3c32a5cc993dc686e7fe93c68b | |
parent | f1bf14ea89ea082e5edd4e9c90738370bffcab1c [diff] [blame] |
[subset] fix fuzzer found underflow when heap push fails. Fixes https://oss-fuzz.com/testcase-detail/5148625505746944.
diff --git a/src/hb-priority-queue.hh b/src/hb-priority-queue.hh index 1168247..ffb86e3 100644 --- a/src/hb-priority-queue.hh +++ b/src/hb-priority-queue.hh
@@ -51,6 +51,7 @@ void insert (int64_t priority, unsigned value) { heap.push (item_t (priority, value)); + if (unlikely (heap.in_error ())) return; bubble_up (heap.length - 1); }