Commit a76e91bf authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/avfiltergraph: assert that the heap_bubble index is valid

This might help coverity
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 424ed1a8
......@@ -1280,6 +1280,8 @@ static void heap_bubble_up(AVFilterGraph *graph,
{
AVFilterLink **links = graph->sink_links;
av_assert0(index >= 0);
while (index) {
int parent = (index - 1) >> 1;
if (links[parent]->current_pts >= link->current_pts)
......@@ -1297,6 +1299,8 @@ static void heap_bubble_down(AVFilterGraph *graph,
{
AVFilterLink **links = graph->sink_links;
av_assert0(index >= 0);
while (1) {
int child = 2 * index + 1;
if (child >= graph->sink_links_count)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment