mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 03:32:28 +00:00 
			
		
		
		
	Fix nullptr dereference in pp_symbol when handling null symbol names (#7790)
* Initial plan * Fix nullptr dereference in pp_symbol with null symbol names Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									a121e6c6e9
								
							
						
					
					
						commit
						d8bf0e047f
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		|  | @ -42,8 +42,13 @@ static unsigned pp_symbol(std::ostream & out, symbol const & s) { | |||
|         return static_cast<unsigned>(str.length()); | ||||
|     } | ||||
|     else { | ||||
|         out << s.bare_str(); | ||||
|         return static_cast<unsigned>(strlen(s.bare_str())); | ||||
|         if (s.is_null()) { | ||||
|             out << "null"; | ||||
|             return 4; // length of "null"
 | ||||
|         } else { | ||||
|             out << s.bare_str(); | ||||
|             return static_cast<unsigned>(strlen(s.bare_str())); | ||||
|         } | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue