Don't call elf_hash on NULL value
Make sur elf_hash is never invoked with a NULL value. Signed-off-by: Thomas Preud'homme <robotux@celest.fr>
This commit is contained in:
		
							parent
							
								
									93785149ed
								
							
						
					
					
						commit
						505329b5b3
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								tccelf.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								tccelf.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -114,7 +114,7 @@ ST_FUNC int put_elf_sym(Section *s, uplong value, unsigned long size,
 | 
			
		|||
        if (ELFW(ST_BIND)(info) != STB_LOCAL) {
 | 
			
		||||
            /* add another hashing entry */
 | 
			
		||||
            nbuckets = base[0];
 | 
			
		||||
            h = elf_hash(name) % nbuckets;
 | 
			
		||||
            h = name ? elf_hash(name) % nbuckets : 0;
 | 
			
		||||
            *ptr = base[2 + h];
 | 
			
		||||
            base[2 + h] = sym_index;
 | 
			
		||||
            base[1]++;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue