qdm2: fix out of array read
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		
							parent
							
								
									7d74aaf698
								
							
						
					
					
						commit
						fe91becc2d
					
				| @ -884,9 +884,12 @@ static int synthfilt_build_sb_samples (QDM2Context *q, GetBitContext *gb, int le | |||||||
|                         break; |                         break; | ||||||
| 
 | 
 | ||||||
|                     case 30: |                     case 30: | ||||||
|                         if (BITS_LEFT(length,gb) >= 4) |                         if (BITS_LEFT(length,gb) >= 4) { | ||||||
|                             samples[0] = type30_dequant[qdm2_get_vlc(gb, &vlc_tab_type30, 0, 1)]; |                             unsigned v = qdm2_get_vlc(gb, &vlc_tab_type30, 0, 1); | ||||||
|                         else |                             if (v >= FF_ARRAY_ELEMS(type30_dequant)) | ||||||
|  |                                 return AVERROR_INVALIDDATA; | ||||||
|  |                             samples[0] = type30_dequant[v]; | ||||||
|  |                         } else | ||||||
|                             samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx); |                             samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx); | ||||||
| 
 | 
 | ||||||
|                         run = 1; |                         run = 1; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user