You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avcodec/bitstream: Assert that there is enough space left in avpriv_copy_bits()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		| @@ -70,6 +70,8 @@ void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length) | |||||||
|     if (length == 0) |     if (length == 0) | ||||||
|         return; |         return; | ||||||
|  |  | ||||||
|  |     av_assert0(length <= put_bits_left(pb)); | ||||||
|  |  | ||||||
|     if (CONFIG_SMALL || words < 16 || put_bits_count(pb) & 7) { |     if (CONFIG_SMALL || words < 16 || put_bits_count(pb) & 7) { | ||||||
|         for (i = 0; i < words; i++) |         for (i = 0; i < words; i++) | ||||||
|             put_bits(pb, 16, AV_RB16(src + 2 * i)); |             put_bits(pb, 16, AV_RB16(src + 2 * i)); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user