You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	lavc/dovi_rpu: Fix UB for possible left shift of negative values
It is undefined to left-shift a negative value.
This commit is contained in:
		
				
					committed by
					
						 Thilo Borgmann
						Thilo Borgmann
					
				
			
			
				
	
			
			
			
						parent
						
							aa1babc59a
						
					
				
				
					commit
					c02dd59cd3
				
			| @@ -172,7 +172,7 @@ static inline int64_t get_se_coef(GetBitContext *gb, const AVDOVIRpuDataHeader * | ||||
|     case RPU_COEFF_FIXED: | ||||
|         ipart = get_se_golomb_long(gb); | ||||
|         fpart.u32 = get_bits_long(gb, hdr->coef_log2_denom); | ||||
|         return (ipart << hdr->coef_log2_denom) + fpart.u32; | ||||
|         return ipart * (1LL << hdr->coef_log2_denom) + fpart.u32; | ||||
|  | ||||
|     case RPU_COEFF_FLOAT: | ||||
|         fpart.u32 = get_bits_long(gb, 32); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user