| 
																	
																	
																		
																	
																	
																 | 
																@@ -132,12 +132,6 @@ static int decode_frame(AVCodecContext *avctx, | 
															
														
														
													
														
															
																 | 
																 | 
																    h         = bytestream2_get_le16(&s->gb); | 
																 | 
																 | 
																    h         = bytestream2_get_le16(&s->gb); | 
															
														
														
													
														
															
																 | 
																 | 
																    bpp       = bytestream2_get_byte(&s->gb); | 
																 | 
																 | 
																    bpp       = bytestream2_get_byte(&s->gb); | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																    if (bytestream2_get_bytes_left(&s->gb) <= idlen) { | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        av_log(avctx, AV_LOG_ERROR, | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																                "Not enough data to read header\n"); | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        return AVERROR_INVALIDDATA; | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    } | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    flags     = bytestream2_get_byte(&s->gb); | 
																 | 
																 | 
																    flags     = bytestream2_get_byte(&s->gb); | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																    if (!pal && (first_clr || colors || csize)) { | 
																 | 
																 | 
																    if (!pal && (first_clr || colors || csize)) { | 
															
														
														
													
												
													
														
															
																| 
																	
																	
																	
																		
																	
																 | 
																@@ -146,6 +140,12 @@ static int decode_frame(AVCodecContext *avctx, | 
															
														
														
													
														
															
																 | 
																 | 
																        first_clr = colors = csize = 0; | 
																 | 
																 | 
																        first_clr = colors = csize = 0; | 
															
														
														
													
														
															
																 | 
																 | 
																    } | 
																 | 
																 | 
																    } | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    if (bytestream2_get_bytes_left(&s->gb) < idlen + 2*colors) { | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        av_log(avctx, AV_LOG_ERROR, | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																                "Not enough data to read header\n"); | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        return AVERROR_INVALIDDATA; | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    } | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																    // skip identifier if any | 
																 | 
																 | 
																    // skip identifier if any | 
															
														
														
													
														
															
																 | 
																 | 
																    bytestream2_skip(&s->gb, idlen); | 
																 | 
																 | 
																    bytestream2_skip(&s->gb, idlen); | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																	
																 | 
																
  |