| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -114,12 +114,12 @@ static int cpia_decode_frame(AVCodecContext *avctx, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        src += 2; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        if (src_size < linelength) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            frame->decode_error_flags = FF_DECODE_ERROR_INVALID_BITSTREAM; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            av_frame_set_decode_error_flags(frame, FF_DECODE_ERROR_INVALID_BITSTREAM); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            av_log(avctx, AV_LOG_WARNING, "Frame ended enexpectedly!\n"); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            break; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        if (src[linelength - 1] != EOL) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            frame->decode_error_flags = FF_DECODE_ERROR_INVALID_BITSTREAM; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            av_frame_set_decode_error_flags(frame, FF_DECODE_ERROR_INVALID_BITSTREAM); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            av_log(avctx, AV_LOG_WARNING, "Wrong line length %d or line not terminated properly (found 0x%02x)!\n", linelength, src[linelength - 1]); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            break; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        } | 
		
		
	
	
		
			
				| 
				
				
				
					
				
				 | 
			
			 | 
			@@ -140,7 +140,7 @@ static int cpia_decode_frame(AVCodecContext *avctx, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			             */ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            for (j = 0; j < linelength - 1; j++) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                if (y > y_end) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    frame->decode_error_flags = FF_DECODE_ERROR_INVALID_BITSTREAM; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    av_frame_set_decode_error_flags(frame, FF_DECODE_ERROR_INVALID_BITSTREAM); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    av_log(avctx, AV_LOG_WARNING, "Decoded data exceeded linesize!\n"); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    break; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                } | 
		
		
	
	
		
			
				| 
				
				
				
					
				
				 | 
			
			 | 
			@@ -160,7 +160,7 @@ static int cpia_decode_frame(AVCodecContext *avctx, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			             */ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            for (j = 0; j < linelength - 4; ) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                if (y + 1 > y_end || u > u_end || v > v_end) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    frame->decode_error_flags = FF_DECODE_ERROR_INVALID_BITSTREAM; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    av_frame_set_decode_error_flags(frame, FF_DECODE_ERROR_INVALID_BITSTREAM); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    av_log(avctx, AV_LOG_WARNING, "Decoded data exceeded linesize!\n"); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    break; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                } | 
		
		
	
	
		
			
				| 
				
					
				
				
				
				 | 
			
			 | 
			
  |