smacker: fix off by one error
Regression sincea93b572ae4. Fixes #2426. Signed-off-by: Paul B Mahol <onemda@gmail.com> (cherry picked from commite3cc92a623)
This commit is contained in:
		
				
					committed by
					
						
						Carl Eugen Hoyos
					
				
			
			
				
	
			
			
			
						parent
						
							8ba3198549
						
					
				
				
					commit
					5ee539f69d
				
			@@ -276,7 +276,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
 | 
			
		||||
                } else if(t & 0x40){ /* copy with offset */
 | 
			
		||||
                    off = avio_r8(s->pb);
 | 
			
		||||
                    j = (t & 0x3F) + 1;
 | 
			
		||||
                    if (off + j > 0xff) {
 | 
			
		||||
                    if (off + j - 1 > 0xff) {
 | 
			
		||||
                        av_log(s, AV_LOG_ERROR,
 | 
			
		||||
                               "Invalid palette update, offset=%d length=%d extends beyond palette size\n",
 | 
			
		||||
                               off, j);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user