mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 13:29:11 +00:00 
			
		
		
		
	Fix nullptr dereference in pp_symbol with null symbol names
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									b653b6d34e
								
							
						
					
					
						commit
						ed874351be
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -42,10 +42,15 @@ static unsigned pp_symbol(std::ostream & out, symbol const & s) {
 | 
			
		|||
        return static_cast<unsigned>(str.length());
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        if (s.is_null()) {
 | 
			
		||||
            out << "null";
 | 
			
		||||
            return 4; // length of "null"
 | 
			
		||||
        } else {
 | 
			
		||||
            out << s.bare_str();
 | 
			
		||||
            return static_cast<unsigned>(strlen(s.bare_str()));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define TAB_SZ 2
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue