diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-18 11:55:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-18 12:31:02 +0100 |
commit | a76e91bf6708f8a4d17a69b157c4a860ccdcda95 (patch) | |
tree | 459db418b7b36dbb872572d27715e4222d311113 /libavfilter/avfiltergraph.c | |
parent | 424ed1a83e1f6b3e8dad249c39d68d771d3f8164 (diff) | |
download | ffmpeg-a76e91bf6708f8a4d17a69b157c4a860ccdcda95.tar.gz |
avfilter/avfiltergraph: assert that the heap_bubble index is valid
This might help coverity
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r-- | libavfilter/avfiltergraph.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index a859ecbde9..2e69cdd2d7 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -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) |