You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02: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:
		| @@ -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; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user