mov: validate sidx timescale
A negative timescale doesn't make sense and triggers assertions in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
		
							parent
							
								
									a398f054fd
								
							
						
					
					
						commit
						9d36602abc
					
				@ -4247,6 +4247,11 @@ static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 | 
			
		||||
 | 
			
		||||
    timescale = av_make_q(1, avio_rb32(pb));
 | 
			
		||||
 | 
			
		||||
    if (timescale.den <= 0) {
 | 
			
		||||
        av_log(c->fc, AV_LOG_ERROR, "Invalid sidx timescale 1/%d\n", timescale.den);
 | 
			
		||||
        return AVERROR_INVALIDDATA;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (version == 0) {
 | 
			
		||||
        pts = avio_rb32(pb);
 | 
			
		||||
        offset += avio_rb32(pb);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user