diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-03-15 15:58:35 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-03-15 16:18:27 +0100 |
commit | ac7dc20a5d7b7b9174d4aeadc06b73583fa7c3a4 (patch) | |
tree | 307a6b9b715471967610c317473efd65a33819da /libavfilter | |
parent | 9e241bdffd310711c48799cb7a919df61488432c (diff) |
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@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_join.c | 4 |
1 files 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; } |