mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-03 19:17:02 -05:00 
			
		
		
		
	Fix #1276127 [calibre/src/unrar/unpack.cpp:1159]: (style) Array index 'CurBitLength' is used before limits check.](https://bugs.launchpad.net/calibre/+bug/1276127)
This commit is contained in:
		
							parent
							
								
									2e608ed179
								
							
						
					
					
						commit
						d59f9c6f73
					
				@ -1156,7 +1156,7 @@ void Unpack::MakeDecodeTables(byte *LengthTable,DecodeTable *Dec,uint Size)
 | 
			
		||||
  
 | 
			
		||||
    // Find the upper limit for current bit field and adjust the bit length
 | 
			
		||||
    // accordingly if necessary.
 | 
			
		||||
    while (BitField>=Dec->DecodeLen[CurBitLength] && CurBitLength<ASIZE(Dec->DecodeLen))
 | 
			
		||||
    while (CurBitLength<ASIZE(Dec->DecodeLen) && BitField>=Dec->DecodeLen[CurBitLength] )
 | 
			
		||||
      CurBitLength++;
 | 
			
		||||
 | 
			
		||||
    // Translation of right aligned bit string to bit length.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user