LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File nagios-fix_spurious_dollar_signs_added_to_command_lines.patch of Package nagios (Project openSUSE:Factory)

---
 common/macros.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: nagios/common/macros.c
===================================================================
--- nagios.orig/common/macros.c
+++ nagios/common/macros.c
@@ -185,7 +185,8 @@ int process_macros_r(nagios_macros *mac,
 				*output_buffer = (char *)realloc(*output_buffer, strlen(*output_buffer) + strlen(temp_buffer) + 3);
 				strcat(*output_buffer, "$");
 				strcat(*output_buffer, temp_buffer);
-				strcat(*output_buffer, "$");
+				if (buf_ptr != NULL)
+                                  strcat(*output_buffer, "$");
 				}
 
 			/* insert macro */