avcodec/rasc: Check frame before clearing
Fixes: null pointer dereference Fixes: 27737/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5769028685266944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 380a3a0adfae7aa898d2ec8a5b0d5cd949a11111) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
		
							parent
							
								
									c4da89d962
								
							
						
					
					
						commit
						50ac656fdd
					
				@ -70,6 +70,9 @@ static void clear_plane(AVCodecContext *avctx, AVFrame *frame)
 | 
			
		||||
    RASCContext *s = avctx->priv_data;
 | 
			
		||||
    uint8_t *dst = frame->data[0];
 | 
			
		||||
 | 
			
		||||
    if (!dst)
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    for (int y = 0; y < avctx->height; y++) {
 | 
			
		||||
        memset(dst, 0, avctx->width * s->bpp);
 | 
			
		||||
        dst += frame->linesize[0];
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user