You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avcodec/jpeg2000dec: make SOC finding code more robust
Fixes file from Ticket860 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		| @@ -1615,6 +1615,9 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, void *data, | ||||
|         bytestream2_seek(&s->g, 0, SEEK_SET); | ||||
|     } | ||||
|  | ||||
|     while (bytestream2_get_bytes_left(&s->g) >= 3 && bytestream2_peek_be16(&s->g) != JPEG2000_SOC) | ||||
|         bytestream2_skip(&s->g, 1); | ||||
|  | ||||
|     if (bytestream2_get_be16u(&s->g) != JPEG2000_SOC) { | ||||
|         av_log(avctx, AV_LOG_ERROR, "SOC marker not present\n"); | ||||
|         ret = AVERROR_INVALIDDATA; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user