mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-21 06:50:56 +00:00
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>
This commit is contained in:
parent
9e241bdffd
commit
ac7dc20a5d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user