You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +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:
@@ -1280,6 +1280,8 @@ static void heap_bubble_up(AVFilterGraph *graph,
|
|||||||
{
|
{
|
||||||
AVFilterLink **links = graph->sink_links;
|
AVFilterLink **links = graph->sink_links;
|
||||||
|
|
||||||
|
av_assert0(index >= 0);
|
||||||
|
|
||||||
while (index) {
|
while (index) {
|
||||||
int parent = (index - 1) >> 1;
|
int parent = (index - 1) >> 1;
|
||||||
if (links[parent]->current_pts >= link->current_pts)
|
if (links[parent]->current_pts >= link->current_pts)
|
||||||
@@ -1297,6 +1299,8 @@ static void heap_bubble_down(AVFilterGraph *graph,
|
|||||||
{
|
{
|
||||||
AVFilterLink **links = graph->sink_links;
|
AVFilterLink **links = graph->sink_links;
|
||||||
|
|
||||||
|
av_assert0(index >= 0);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int child = 2 * index + 1;
|
int child = 2 * index + 1;
|
||||||
if (child >= graph->sink_links_count)
|
if (child >= graph->sink_links_count)
|
||||||
|
Reference in New Issue
Block a user