You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	ffv1: fix undefined behavior with insane widths.
The new tables is large enough to prevent this together with our image size checks. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
		
				
					committed by
					
						 Anton Khirnov
						Anton Khirnov
					
				
			
			
				
	
			
			
			
						parent
						
							9776e25db9
						
					
				
				
					commit
					294e5475c2
				
			| @@ -32,11 +32,13 @@ | ||||
| #include "get_bits.h" | ||||
| #include "put_bits.h" | ||||
|  | ||||
| const uint8_t ff_log2_run[32]={ | ||||
| const uint8_t ff_log2_run[41]={ | ||||
|  0, 0, 0, 0, 1, 1, 1, 1, | ||||
|  2, 2, 2, 2, 3, 3, 3, 3, | ||||
|  4, 4, 5, 5, 6, 6, 7, 7, | ||||
|  8, 9,10,11,12,13,14,15 | ||||
|  8, 9,10,11,12,13,14,15, | ||||
| 16,17,18,19,20,21,22,23, | ||||
| 24, | ||||
| }; | ||||
|  | ||||
| void align_put_bits(PutBitContext *s) | ||||
|   | ||||
| @@ -40,7 +40,7 @@ | ||||
| #define MAX_QUANT_TABLES 8 | ||||
| #define MAX_CONTEXT_INPUTS 5 | ||||
|  | ||||
| extern const uint8_t ff_log2_run[32]; | ||||
| extern const uint8_t ff_log2_run[41]; | ||||
|  | ||||
| static const int8_t quant3[256]={ | ||||
|  0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user