libc/iconv: find_alias was mis-computing remaining alias table length
This caused the strnstr to walk off the end of the alias array and fetch invalid data. Instead of attempting to update 'len', just re-compute it based on the table end pointer that is already known. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
		
				
					committed by
					
						
						Corinna Vinschen
					
				
			
			
				
	
			
			
			
						parent
						
							2c33d31fa8
						
					
				
				
					commit
					24f3c61953
				
			@@ -115,7 +115,7 @@ search_again:
 | 
			
		||||
     && (p+l == table_end || isspace (*(p+l)) || *(p+l) == '\n')))
 | 
			
		||||
    {
 | 
			
		||||
      ptable = p + l;
 | 
			
		||||
      len -= table - p;
 | 
			
		||||
      len = table_end - ptable;
 | 
			
		||||
      goto search_again;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user