avformat/mvdec: Check if name was fully read
Fixes: use of uninitialized value Fixes: 70901/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-6341913949569024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
		
							parent
							
								
									5338707930
								
							
						
					
					
						commit
						4e39795c75
					
				@ -256,7 +256,8 @@ static int read_table(AVFormatContext *avctx, AVStream *st,
 | 
				
			|||||||
        if (avio_feof(pb))
 | 
					        if (avio_feof(pb))
 | 
				
			||||||
            return AVERROR_EOF;
 | 
					            return AVERROR_EOF;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        avio_read(pb, name, 16);
 | 
					        if (avio_read(pb, name, 16) != 16)
 | 
				
			||||||
 | 
					            return AVERROR_INVALIDDATA;
 | 
				
			||||||
        name[sizeof(name) - 1] = 0;
 | 
					        name[sizeof(name) - 1] = 0;
 | 
				
			||||||
        size = avio_rb32(pb);
 | 
					        size = avio_rb32(pb);
 | 
				
			||||||
        if (size < 0) {
 | 
					        if (size < 0) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user