[lldb/API] Fix non null-terminated stop-reason in SBThread::GetStopDescription
When trying to get the stop reason description using the SB API, the buffer fetched was not null-terminated causing failures on the sanitized bot. This patch should address those failures. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
@@ -326,7 +326,7 @@ size_t SBThread::GetStopDescription(char *dst, size_t dst_len) {
|
||||
StopInfoSP stop_info_sp = exe_ctx.GetThreadPtr()->GetStopInfo();
|
||||
if (stop_info_sp) {
|
||||
const char *stop_desc =
|
||||
exe_ctx.GetThreadPtr()->GetStopDescription().data();
|
||||
exe_ctx.GetThreadPtr()->GetStopDescription().c_str();
|
||||
if (stop_desc) {
|
||||
if (dst)
|
||||
return ::snprintf(dst, dst_len, "%s", stop_desc);
|
||||
|
||||
Reference in New Issue
Block a user