[FFmpeg-devel] [PATCH] avfilter/avf_showwaves: fix off by one error in loop condition

Paul B Mahol onemda at gmail.com
Sun Nov 9 14:37:03 CET 2014


On 11/9/14, Marton Balint <cus at passwd.hu> wrote:
> It caused segfaults.
>
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
>  libavfilter/avf_showwaves.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
> index 4cd225a..fa34a52 100644
> --- a/libavfilter/avf_showwaves.c
> +++ b/libavfilter/avf_showwaves.c
> @@ -157,7 +157,7 @@ inline static int push_frame(AVFilterLink *outlink)
>          showwaves->req_fullfilled = 1;
>      showwaves->outpicref = NULL;
>      showwaves->buf_idx = 0;
> -    for (i = 0; i <= nb_channels; i++)
> +    for (i = 0; i < nb_channels; i++)
>          showwaves->buf_idy[i] = 0;
>      return ret;
>  }
> --
> 2.1.2
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
ok


More information about the ffmpeg-devel mailing list