You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avfilter/opencl: Fix program_opencl for source code larger than 64kB
The condition (pos < len) is always true and the rest of the OpenCL program code would not be read, while the maximum number of "rb" is "len - pos - 1", and then, the maximum number of the "pos" is "len - 1". Fixes: trac.ffmpeg.org/ticket/9217
This commit is contained in:
		
				
					committed by
					
						 Paul B Mahol
						Paul B Mahol
					
				
			
			
				
	
			
			
			
						parent
						
							5bcc61ce87
						
					
				
				
					commit
					9b445663a5
				
			| @@ -242,7 +242,7 @@ int ff_opencl_filter_load_program_from_file(AVFilterContext *avctx, | ||||
|             goto fail; | ||||
|         } | ||||
|         pos += rb; | ||||
|         if (pos < len) | ||||
|         if (pos + 1 < len) | ||||
|             break; | ||||
|         len <<= 1; | ||||
|         err = av_reallocp(&src, len); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user