mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/avfiltergraph: assert that the heap_bubble index is valid
This might help coverity Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
424ed1a83e
commit
a76e91bf67
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user