You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	j2k & jpeg2000dec: reset numX/Ytiles if tiles failed allocation
Fixes null pointer dereference Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		| @@ -957,6 +957,8 @@ static int decode_codestream(Jpeg2000DecoderContext *s) | ||||
|         switch (marker){ | ||||
|         case JPEG2000_SIZ: | ||||
|             ret = get_siz(s); | ||||
|             if (!s->tile) | ||||
|                 s->numXtiles = s->numYtiles = 0; | ||||
|             break; | ||||
|         case JPEG2000_COC: | ||||
|             ret = get_coc(s, codsty, properties); | ||||
|   | ||||
| @@ -1181,6 +1181,8 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s) | ||||
|         switch (marker) { | ||||
|         case JPEG2000_SIZ: | ||||
|             ret = get_siz(s); | ||||
|             if (!s->tile) | ||||
|                 s->numXtiles = s->numYtiles = 0; | ||||
|             break; | ||||
|         case JPEG2000_COC: | ||||
|             ret = get_coc(s, codsty, properties); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user