You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avcodec/jpeg2000dec: check that tp_end is after the start
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		| @@ -1237,6 +1237,10 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s) | ||||
|  | ||||
|             tile = s->tile + s->curtileno; | ||||
|             tp = tile->tile_part + tile->tp_idx; | ||||
|             if (tp->tp_end < s->g.buffer) { | ||||
|                 av_log(s->avctx, AV_LOG_ERROR, "Invalid tpend\n"); | ||||
|                 return AVERROR_INVALIDDATA; | ||||
|             } | ||||
|             bytestream2_init(&tp->tpg, s->g.buffer, tp->tp_end - s->g.buffer); | ||||
|             bytestream2_skip(&s->g, tp->tp_end - s->g.buffer); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user