You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	Fixed invalid writes in wavpack decoder on corrupted bitstreams.
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
		
				
					committed by
					
						 Martin Storsjö
						Martin Storsjö
					
				
			
			
				
	
			
			
			
						parent
						
							beefafda63
						
					
				
				
					commit
					0aedab0340
				
			| @@ -1114,7 +1114,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, | ||||
|             int16_t *dst = (int16_t*)samples + 1; | ||||
|             int16_t *src = (int16_t*)samples; | ||||
|             int cnt = samplecount; | ||||
|             while(cnt--){ | ||||
|             while(cnt-- > 0){ | ||||
|                 *dst = *src; | ||||
|                 src += channel_stride; | ||||
|                 dst += channel_stride; | ||||
| @@ -1123,7 +1123,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, | ||||
|             int32_t *dst = (int32_t*)samples + 1; | ||||
|             int32_t *src = (int32_t*)samples; | ||||
|             int cnt = samplecount; | ||||
|             while(cnt--){ | ||||
|             while(cnt-- > 0){ | ||||
|                 *dst = *src; | ||||
|                 src += channel_stride; | ||||
|                 dst += channel_stride; | ||||
| @@ -1132,7 +1132,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, | ||||
|             float *dst = (float*)samples + 1; | ||||
|             float *src = (float*)samples; | ||||
|             int cnt = samplecount; | ||||
|             while(cnt--){ | ||||
|             while(cnt-- > 0){ | ||||
|                 *dst = *src; | ||||
|                 src += channel_stride; | ||||
|                 dst += channel_stride; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user