From 63cef3fc605ad5cd007e5605388cb61416024893 Mon Sep 17 00:00:00 2001 From: Like Ma Date: Tue, 5 Mar 2019 18:44:31 +0800 Subject: [PATCH] Fix ACE_Stack_Trace potential buffer overflow. --- ACE/ace/Stack_Trace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACE/ace/Stack_Trace.cpp b/ACE/ace/Stack_Trace.cpp index d4be219625298..32fa9450e8317 100644 --- a/ACE/ace/Stack_Trace.cpp +++ b/ACE/ace/Stack_Trace.cpp @@ -92,7 +92,7 @@ ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, size_t num_frame stack_syms = ::backtrace_symbols (stack, stack_size); for (size_t i = starting_frame; - i < stack_size && num_frames > 0; + i < stack_size && num_frames > 0 && this->buflen_ < SYMBUFSIZ - 1; i++, num_frames--) { // this could be more efficient by remembering where we left off in buf_