On Fri, Feb 2, 2018 at 2:48 PM, Jason Molenda via lldb-commits <lldb-commits@lists.llvm.org> wrote: > Author: jmolenda > Date: Fri Feb 2 14:48:45 2018 > New Revision: 324156 > > URL: http://llvm.org/viewvc/llvm-project?rev=324156&view=rev > Log: > Fix a copy of a fixed length, possibly non-nul terminated, string > into a std::string so we don't run off the end of the array when > there is no nul byte in ProcessElfCore::parseLinuxNotes. > Found with ASAN testing. > > <rdar://problem/37134319> > > Differential revision: https://reviews.llvm.org/D42828 > > Modified: > lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp > > Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp?rev=324156&r1=324155&r2=324156&view=diff > ============================================================================== > --- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp (original) > +++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp Fri Feb 2 > 14:48:45 2018 > @@ -665,7 +665,7 @@ llvm::Error ProcessElfCore::parseLinuxNo > Status status = prpsinfo.Parse(note.data, arch); > if (status.Fail()) > return status.ToError(); > - thread_data.name = prpsinfo.pr_fname; > + thread_data.name.assign (prpsinfo.pr_fname, strnlen > (prpsinfo.pr_fname, sizeof (prpsinfo.pr_fname)));
This seems to exceed 80 lines, can you please `clang-format` it for consistency? Thanks! -- Davide _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits