diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2023-12-24 20:31:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2023-12-29 01:19:04 +0100 |
commit | ab0fdaedd1e7224f7e84ea22fcbfaa4ca75a6c06 (patch) | |
tree | 150a1537fc0bd8ee10edc24a44f3dbdde4ca2d78 /libavfilter | |
parent | aec67d3d7d2895bfea61aa1358d9d8e956f8615c (diff) | |
download | ffmpeg-ab0fdaedd1e7224f7e84ea22fcbfaa4ca75a6c06.tar.gz |
avfilter/avf_showspectrum: fix off by 1 error
Fixes: out of array access
Fixes: tickets/10749/poc15ffmpeg
Regression since: 81df787b53eb5c6433731f6eaaf7f2a94d8a8c80
Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avf_showspectrum.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index 8cf73fce70..99a5c33d09 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -1784,7 +1784,7 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink) int acc_samples = 0; int dst_offset = 0; - while (nb_frame <= s->nb_frames) { + while (nb_frame < s->nb_frames) { AVFrame *cur_frame = s->frames[nb_frame]; int cur_frame_samples = cur_frame->nb_samples; int nb_samples = 0; |