Skip to content

Commit bbafa52

Browse files
[lldb] Fix asan failure in MinidumpFileBuilder
As per comment in #138698 (comment)
1 parent 78e5734 commit bbafa52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ Status MinidumpFileBuilder::AddExceptions() {
718718
// We have 120 bytes to work with and it's unlikely description will
719719
// overflow, but we gotta check.
720720
memcpy(&exp_record.ExceptionInformation, description.c_str(),
721-
std::max(description.size(), Exception::MaxParameterBytes));
721+
std::min(description.size(), Exception::MaxParameterBytes));
722722
exp_record.UnusedAlignment = static_cast<llvm::support::ulittle32_t>(0);
723723
ExceptionStream exp_stream;
724724
exp_stream.ThreadId =

0 commit comments

Comments
 (0)