mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-10-31 04:26:37 +08:00 
			
		
		
		
	on2avc: check number of channels
Fixes invalid memory access. CC: libav-stable@libav.org Bug-ID: CVE-2014-8549 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
		 Michael Niedermayer
					Michael Niedermayer
				
			
				
					committed by
					
						 Anton Khirnov
						Anton Khirnov
					
				
			
			
				
	
			
			
			 Anton Khirnov
						Anton Khirnov
					
				
			
						parent
						
							d423dd72be
						
					
				
				
					commit
					cee4490b52
				
			| @@ -918,6 +918,10 @@ static av_cold int on2avc_decode_init(AVCodecContext *avctx) | ||||
|         av_log(avctx, AV_LOG_ERROR, "0x500 version should be mono\n"); | ||||
|         return AVERROR_INVALIDDATA; | ||||
|     } | ||||
|     if (avctx->channels > 2) { | ||||
|         av_log(avctx, AV_LOG_ERROR, "Only 1 or 2 channels are supported.\n"); | ||||
|         return AVERROR(EINVAL); | ||||
|     } | ||||
|     if (avctx->channels == 2) | ||||
|         av_log(avctx, AV_LOG_WARNING, | ||||
|                "Stereo mode support is not good, patch is welcome\n"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user