Make sure to quote empty strings
This commit is contained in:
		
							
								
								
									
										2
									
								
								sdn.cpp
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								sdn.cpp
									
									
									
									
									
								
							@@ -114,7 +114,7 @@ fun needs_shell_quoting (const string &v) -> bool {
 | 
				
			|||||||
	for (auto c : v)
 | 
						for (auto c : v)
 | 
				
			||||||
		if (strchr ("|&;<>()$`\\\"' \t\n" "*?[#˜=%" "!", c))
 | 
							if (strchr ("|&;<>()$`\\\"' \t\n" "*?[#˜=%" "!", c))
 | 
				
			||||||
			return true;
 | 
								return true;
 | 
				
			||||||
	return false;
 | 
						return v.empty ();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fun shell_escape (const string &v) -> string {
 | 
					fun shell_escape (const string &v) -> string {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user