[subset] fix fuzzer found underflow when heap push fails.
Fixes https://oss-fuzz.com/testcase-detail/5148625505746944.
This commit is contained in:
parent
f1bf14ea89
commit
73b8360dcf
|
@ -51,6 +51,7 @@ struct hb_priority_queue_t
|
||||||
void insert (int64_t priority, unsigned value)
|
void insert (int64_t priority, unsigned value)
|
||||||
{
|
{
|
||||||
heap.push (item_t (priority, value));
|
heap.push (item_t (priority, value));
|
||||||
|
if (unlikely (heap.in_error ())) return;
|
||||||
bubble_up (heap.length - 1);
|
bubble_up (heap.length - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue