Overrun of static array "normal_output_buffer" of size 2048 at position 2048 with index variable "normal_output_buffer_idx"
536 normal_output_buffer[normal_output_buffer_idx] = '\0'; 537 syslog_output_buffer[syslog_output_buffer_idx] = '\0'; 538 Signed-off-by: Angus Salkeld <[email protected]> --- exec/logsys.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exec/logsys.c b/exec/logsys.c index 978c157..395a59d 100644 --- a/exec/logsys.c +++ b/exec/logsys.c @@ -527,8 +527,8 @@ static void log_printf_to_logs ( syslog_output_buffer_idx += syslog_len; format_buffer_idx += 1; } - if ((normal_output_buffer_idx == sizeof (normal_output_buffer)) || - (syslog_output_buffer_idx == sizeof (syslog_output_buffer))) { + if ((normal_output_buffer_idx >= sizeof (normal_output_buffer - 2)) || + (syslog_output_buffer_idx >= sizeof (syslog_output_buffer - 1))) { break; } } -- 1.6.2.5 _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
