This revision was automatically updated to reflect the committed changes.
Closed by commit rL324156: Fix a copy of a fixed length, possibly non-nul
terminated, string (authored by jmolenda, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D42828?vs=132500=132688#toc
clayborg added inline comments.
Comment at: source/Plugins/Process/elf-core/ProcessElfCore.cpp:668
return status.ToError();
- thread_data.name = prpsinfo.pr_fname;
+ thread_data.name.assign (prpsinfo.pr_fname, sizeof (prpsinfo.pr_fname));
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.
Looks good, just make sure to not include extra \0 bytes.
Comment at: source/Plugins/Process/elf-core/ProcessElfCore.cpp:668
return status.ToError();
-
jasonmolenda created this revision.
jasonmolenda added a reviewer: labath.
jasonmolenda added a project: LLDB.
Herald added a subscriber: llvm-commits.
I caught this while running the testsuite against lldb built with address
sanitizer (ASAN) enabled - it found one problem when running the