[FFmpeg-devel] [PATCH] ffmpeg: fix validity test for file index.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Apr 22 12:19:44 CEST 2012


On Sun, Apr 22, 2012 at 12:12:47PM +0200, Nicolas George wrote:
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  ffmpeg.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index e754fe4..cc2e1aa 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -862,7 +862,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
>          char *p;
>          int file_idx = strtol(in->name, &p, 0);
>  
> -        if (file_idx < 0 || file_idx > nb_input_files) {
> +        if (file_idx < 0 || file_idx >= nb_input_files) {
>              av_log(NULL, AV_LOG_FATAL, "Invalid file index %d in filtegraph description %s.\n",

Might fix spelling of filtergraph, too, after that.


More information about the ffmpeg-devel mailing list