You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avcodec/vqcdec: Check init_get_bits8() for failure
Fixes: CID1516090 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6a9302739f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
			
			
This commit is contained in:
		| @@ -146,10 +146,13 @@ static int decode_vectors(VqcContext * s, const uint8_t * buf, int size, int wid | |||||||
|     GetBitContext gb; |     GetBitContext gb; | ||||||
|     uint8_t * vectors = s->vectors; |     uint8_t * vectors = s->vectors; | ||||||
|     uint8_t * vectors_end = s->vectors + (width * height * 3) / 2; |     uint8_t * vectors_end = s->vectors + (width * height * 3) / 2; | ||||||
|  |     int ret; | ||||||
|  |  | ||||||
|     memset(vectors, 0, 3 * width * height / 2); |     memset(vectors, 0, 3 * width * height / 2); | ||||||
|  |  | ||||||
|     init_get_bits8(&gb, buf, size); |     ret = init_get_bits8(&gb, buf, size); | ||||||
|  |     if (ret < 0) | ||||||
|  |         return ret; | ||||||
|  |  | ||||||
|     for (int i = 0; i < 3 * width * height / 2 / 32; i++) { |     for (int i = 0; i < 3 * width * height / 2 / 32; i++) { | ||||||
|         uint8_t * dst = vectors; |         uint8_t * dst = vectors; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user