diff options
| author | Med Ismail Bennani <medismail.bennani@gmail.com> | 2020-02-06 00:15:37 +0100 |
|---|---|---|
| committer | Med Ismail Bennani <medismail.bennani@gmail.com> | 2020-02-06 00:20:33 +0100 |
| commit | 42c906bceffaadeb704f2629d21f33aece831bc6 (patch) | |
| tree | 042c8a507b2ecf1785cb4d4606d8c83508b583ea /lldb/source/API/SBThread.cpp | |
| parent | bab993451e74af688bafb8806768a34882f6b66e (diff) | |
| download | llvm-42c906bceffaadeb704f2629d21f33aece831bc6.zip llvm-42c906bceffaadeb704f2629d21f33aece831bc6.tar.gz llvm-42c906bceffaadeb704f2629d21f33aece831bc6.tar.bz2 | |
[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>
Diffstat (limited to 'lldb/source/API/SBThread.cpp')
| -rw-r--r-- | lldb/source/API/SBThread.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp index b215cdd..049a0b2 100644 --- a/lldb/source/API/SBThread.cpp +++ b/lldb/source/API/SBThread.cpp @@ -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); |
