[FFmpeg-cvslog] avfilter/af_join: Don't use memcpy for overlapping regions
Andreas Rheinhardt
git at videolan.org
Tue Mar 15 17:18:57 EET 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Mar 15 15:58:35 2022 +0100| [ac7dc20a5d7b7b9174d4aeadc06b73583fa7c3a4] | committer: Andreas Rheinhardt
avfilter/af_join: Don't use memcpy for overlapping regions
Reported by ASAN as memcpy-param-overlap when running
the filter-join FATE-test.
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac7dc20a5d7b7b9174d4aeadc06b73583fa7c3a4
---
libavfilter/af_join.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index 3e272d9161..6f01c6f70a 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -252,8 +252,8 @@ typedef struct ChannelList {
static enum AVChannel channel_list_pop(ChannelList *chl, int idx)
{
enum AVChannel ret = chl->ch[idx];
- memcpy(chl->ch + idx, chl->ch + idx + 1,
- (chl->nb_ch - idx - 1) * sizeof(*chl->ch));
+ memmove(chl->ch + idx, chl->ch + idx + 1,
+ (chl->nb_ch - idx - 1) * sizeof(*chl->ch));
chl->nb_ch--;
return ret;
}
More information about the ffmpeg-cvslog
mailing list