aboutsummaryrefslogtreecommitdiff
path: root/naemon/overflow.patch
diff options
context:
space:
mode:
Diffstat (limited to 'naemon/overflow.patch')
-rw-r--r--naemon/overflow.patch137
1 files changed, 137 insertions, 0 deletions
diff --git a/naemon/overflow.patch b/naemon/overflow.patch
new file mode 100644
index 0000000..a700266
--- /dev/null
+++ b/naemon/overflow.patch
@@ -0,0 +1,137 @@
1--- a/src/naemon/xodtemplate.c 2019-07-03 18:34:13.795379190 +0200
2+++ b/src/naemon/xodtemplate.c 2019-07-03 18:33:37.079085158 +0200
3@@ -7488,7 +7488,7 @@
4 } else if (!strcmp(temp_ptr, "a") || !strcmp(temp_ptr, "all")) {
5 temp_host->flap_detection_options = OPT_ALL;
6 } else {
7- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid flap detection option '%s' in host definition.\n", temp_ptr);
8+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid flap detection option '%s' in host definition.\n", (temp_ptr ? temp_ptr : "(null)"));
9 result = ERROR;
10 }
11 }
12@@ -7510,7 +7510,7 @@
13 } else if (!strcmp(temp_ptr, "a") || !strcmp(temp_ptr, "all")) {
14 temp_host->notification_options = OPT_ALL;
15 } else {
16- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid notification option '%s' in host definition.\n", temp_ptr);
17+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid notification option '%s' in host definition.\n", (temp_ptr ? temp_ptr : "(null)"));
18 result = ERROR;
19 }
20 }
21@@ -7537,7 +7537,7 @@
22 } else if (!strcmp(temp_ptr, "a") || !strcmp(temp_ptr, "all")) {
23 temp_host->stalking_options = OPT_ALL;
24 } else {
25- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid stalking option '%s' in host definition.\n", temp_ptr);
26+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid stalking option '%s' in host definition.\n", (temp_ptr ? temp_ptr : "(null)"));
27 result = ERROR;
28 }
29 }
30@@ -7549,29 +7549,29 @@
31 xodtemplate_obsoleted(variable, temp_host->_start_line);
32 } else if (!strcmp(variable, "2d_coords")) {
33 if ((temp_ptr = strtok(value, ", ")) == NULL) {
34- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 2d_coords value '%s' in host definition.\n", temp_ptr);
35+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 2d_coords value '%s' in host definition.\n", (temp_ptr ? temp_ptr : "(null)"));
36 return ERROR;
37 }
38 temp_host->x_2d = atoi(temp_ptr);
39 if ((temp_ptr = strtok(NULL, ", ")) == NULL) {
40- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 2d_coords value '%s' in host definition.\n", temp_ptr);
41+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 2d_coords value '%s' in host definition.\n", (temp_ptr ? temp_ptr : "(null)"));
42 return ERROR;
43 }
44 temp_host->y_2d = atoi(temp_ptr);
45 temp_host->have_2d_coords = TRUE;
46 } else if (!strcmp(variable, "3d_coords")) {
47 if ((temp_ptr = strtok(value, ", ")) == NULL) {
48- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 3d_coords value '%s' in host definition.\n", temp_ptr);
49+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 3d_coords value '%s' in host definition.\n", (temp_ptr ? temp_ptr : "(null)"));
50 return ERROR;
51 }
52 temp_host->x_3d = strtod(temp_ptr, NULL);
53 if ((temp_ptr = strtok(NULL, ", ")) == NULL) {
54- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 3d_coords value '%s' in host definition.\n", temp_ptr);
55+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 3d_coords value '%s' in host definition.\n", (temp_ptr ? temp_ptr : "(null)"));
56 return ERROR;
57 }
58 temp_host->y_3d = strtod(temp_ptr, NULL);
59 if ((temp_ptr = strtok(NULL, ", ")) == NULL) {
60- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 3d_coords value '%s' in host definition.\n", temp_ptr);
61+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 3d_coords value '%s' in host definition.\n", (temp_ptr ? temp_ptr : "(null)"));
62 return ERROR;
63 }
64 temp_host->z_3d = strtod(temp_ptr, NULL);
65@@ -8176,13 +8176,13 @@
66 } else if (!strcmp(variable, "2d_coords")) {
67 temp_ptr = strtok(value, ", ");
68 if (temp_ptr == NULL) {
69- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 2d_coords value '%s' in extended host info definition.\n", temp_ptr);
70+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 2d_coords value '%s' in extended host info definition.\n", (temp_ptr ? temp_ptr : "(null)"));
71 return ERROR;
72 }
73 temp_hostextinfo->x_2d = atoi(temp_ptr);
74 temp_ptr = strtok(NULL, ", ");
75 if (temp_ptr == NULL) {
76- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 2d_coords value '%s' in extended host info definition.\n", temp_ptr);
77+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 2d_coords value '%s' in extended host info definition.\n", (temp_ptr ? temp_ptr : "(null)"));
78 return ERROR;
79 }
80 temp_hostextinfo->y_2d = atoi(temp_ptr);
81@@ -8190,19 +8190,19 @@
82 } else if (!strcmp(variable, "3d_coords")) {
83 temp_ptr = strtok(value, ", ");
84 if (temp_ptr == NULL) {
85- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 3d_coords value '%s' in extended host info definition.\n", temp_ptr);
86+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 3d_coords value '%s' in extended host info definition.\n", (temp_ptr ? temp_ptr : "(null)"));
87 return ERROR;
88 }
89 temp_hostextinfo->x_3d = strtod(temp_ptr, NULL);
90 temp_ptr = strtok(NULL, ", ");
91 if (temp_ptr == NULL) {
92- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 3d_coords value '%s' in extended host info definition.\n", temp_ptr);
93+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 3d_coords value '%s' in extended host info definition.\n", (temp_ptr ? temp_ptr : "(null)"));
94 return ERROR;
95 }
96 temp_hostextinfo->y_3d = strtod(temp_ptr, NULL);
97 temp_ptr = strtok(NULL, ", ");
98 if (temp_ptr == NULL) {
99- nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 3d_coords value '%s' in extended host info definition.\n", temp_ptr);
100+ nm_log(NSLOG_CONFIG_ERROR, "Error: Invalid 3d_coords value '%s' in extended host info definition.\n", (temp_ptr ? temp_ptr : "(null)"));
101 return ERROR;
102 }
103 temp_hostextinfo->z_3d = strtod(temp_ptr, NULL);
104@@ -8369,21 +8369,21 @@
105
106 /* make sure an object type is specified... */
107 if (input[0] == '\x0') {
108- nm_log(NSLOG_CONFIG_ERROR, "Error: No object type specified in file '%s' on line %d.\n", filename, current_line);
109+ nm_log(NSLOG_CONFIG_ERROR, "Error: No object type specified in file '%s' on line %d.\n", filename, (current_line ? current_line : -1));
110 result = ERROR;
111 break;
112 }
113
114 /* we're already in an object definition... */
115 if (in_definition == TRUE) {
116- nm_log(NSLOG_CONFIG_ERROR, "Error: Unexpected start of object definition in file '%s' on line %d. Make sure you close preceding objects before starting a new one.\n", filename, current_line);
117+ nm_log(NSLOG_CONFIG_ERROR, "Error: Unexpected start of object definition in file '%s' on line %d. Make sure you close preceding objects before starting a new one.\n", filename, (current_line ? current_line : -1));
118 result = ERROR;
119 break;
120 }
121
122 /* start a new definition */
123 if (xodtemplate_begin_object_definition(input, xodtemplate_current_config_file, current_line) == ERROR) {
124- nm_log(NSLOG_CONFIG_ERROR, "Error: Could not add object definition in file '%s' on line %d.\n", filename, current_line);
125+ nm_log(NSLOG_CONFIG_ERROR, "Error: Could not add object definition in file '%s' on line %d.\n", filename, (current_line ? current_line : -1));
126 result = ERROR;
127 break;
128 }
129@@ -8401,7 +8401,7 @@
130
131 /* close out current definition */
132 if (xodtemplate_end_object_definition() == ERROR) {
133- nm_log(NSLOG_CONFIG_ERROR, "Error: Could not complete object definition in file '%s' on line %d. Have you named all your objects?\n", filename, current_line);
134+ nm_log(NSLOG_CONFIG_ERROR, "Error: Could not complete object definition in file '%s' on line %d. Have you named all your objects?\n", filename, (current_line ? current_line : -1));
135 result = ERROR;
136 break;
137 }