- sprintf(output_buffer + strlen(output_buffer), "%s", format_hours(parsed_office_hours[i], (char *) DAY_NAMES[i]));
+ written += snprintf(output_buffer + written, buffer_size - written, "%s", format_hours(parsed_office_hours[i], (char *) DAY_NAMES[i]));
+ }
+
+ written += snprintf(output_buffer + written, buffer_size - written, "%s", (char *) OPEN_SERVER_TIME_HTML.data);
+ written += snprintf(output_buffer + written, buffer_size - written, "%s", format_seconds(seconds_of_day));
+ written += snprintf(output_buffer + written, buffer_size - written, "%s", (char *) CLOSE_SERVER_TIME_HTML.data);
+
+ if (conf->additional_information.len > 0) {
+ char additional_info[conf->additional_information.len + 1];
+ ngx_memcpy(additional_info, conf->additional_information.data, conf->additional_information.len);
+ additional_info[conf->additional_information.len] = '\0';
+ written += snprintf(output_buffer + written, buffer_size - written, "%s", additional_info);