avcodec/vc1dec: Check buf2 for malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		
							parent
							
								
									34bddf443c
								
							
						
					
					
						commit
						a66dcfeedc
					
				@ -483,6 +483,9 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        buf2  = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
 | 
					        buf2  = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
 | 
				
			||||||
 | 
					        if (!buf2)
 | 
				
			||||||
 | 
					            return AVERROR(ENOMEM);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        start = find_next_marker(start, end); // in WVC1 extradata first byte is its size, but can be 0 in mkv
 | 
					        start = find_next_marker(start, end); // in WVC1 extradata first byte is its size, but can be 0 in mkv
 | 
				
			||||||
        next  = start;
 | 
					        next  = start;
 | 
				
			||||||
        for (; next < end; start = next) {
 | 
					        for (; next < end; start = next) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user