Message ID | AS1PR01MB95646D28301F19A185C3BB9A8F109@AS1PR01MB9564.eurprd01.prod.exchangelabs.com |
---|---|
State | Accepted |
Commit | ac7dc20a5d7b7b9174d4aeadc06b73583fa7c3a4 |
Headers | show |
Series | [FFmpeg-devel] avfilter/af_join: Don't use memcpy for overlapping regions | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_aarch64_jetson | success | Make finished |
andriy/make_fate_aarch64_jetson | success | Make fate finished |
andriy/make_armv7_RPi4 | success | Make finished |
andriy/make_fate_armv7_RPi4 | success | Make fate finished |
lgtm
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; }
Reported by ASAN as memcpy-param-overlap when running the filter-join FATE-test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavfilter/af_join.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)