| 
																	
																	
																		
																	
																	
																 | 
																@@ -2026,6 +2026,12 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx, | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																    width  = get_bits(&s->gb, 12); | 
																 | 
																 | 
																    width  = get_bits(&s->gb, 12); | 
															
														
														
													
														
															
																 | 
																 | 
																    height = get_bits(&s->gb, 12); | 
																 | 
																 | 
																    height = get_bits(&s->gb, 12); | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    if (width == 0 || height == 0) { | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        av_log(avctx, AV_LOG_WARNING, "Invalid horizontal or vertical size " | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																               "value.\n"); | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        if (avctx->err_recognition & AV_EF_BITSTREAM) | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																            return AVERROR_INVALIDDATA; | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    } | 
															
														
														
													
														
															
																 | 
																 | 
																    s->aspect_ratio_info = get_bits(&s->gb, 4); | 
																 | 
																 | 
																    s->aspect_ratio_info = get_bits(&s->gb, 4); | 
															
														
														
													
														
															
																 | 
																 | 
																    if (s->aspect_ratio_info == 0) { | 
																 | 
																 | 
																    if (s->aspect_ratio_info == 0) { | 
															
														
														
													
														
															
																 | 
																 | 
																        av_log(avctx, AV_LOG_ERROR, "aspect ratio has forbidden 0 value\n"); | 
																 | 
																 | 
																        av_log(avctx, AV_LOG_ERROR, "aspect ratio has forbidden 0 value\n"); | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -2343,7 +2349,8 @@ static int decode_chunks(AVCodecContext *avctx, | 
															
														
														
													
														
															
																 | 
																 | 
																            picture_start_code_seen = 1; | 
																 | 
																 | 
																            picture_start_code_seen = 1; | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																            if (s2->width <= 0 || s2->height <= 0) { | 
																 | 
																 | 
																            if (s2->width <= 0 || s2->height <= 0) { | 
															
														
														
													
														
															
																 | 
																 | 
																                av_log(avctx, AV_LOG_ERROR, "%dx%d is invalid\n", s2->width, s2->height); | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																                av_log(avctx, AV_LOG_ERROR, "Invalid frame dimensions %dx%d.\n", | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																                       s2->width, s2->height); | 
															
														
														
													
														
															
																 | 
																 | 
																                return AVERROR_INVALIDDATA; | 
																 | 
																 | 
																                return AVERROR_INVALIDDATA; | 
															
														
														
													
														
															
																 | 
																 | 
																            } | 
																 | 
																 | 
																            } | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																	
																 | 
																
  |