mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-07 10:54:01 +00:00
[libc] Another fix to add a null-terminator to the pthread name.
This fix is similar to the one done in https://reviews.llvm.org/D148844. This miss was caught by the risv64 builder. Differential Revision: https://reviews.llvm.org/D148871
This commit is contained in:
parent
7d98590b3a
commit
596d87c4cc
@ -358,7 +358,7 @@ int Thread::get_name(cpp::StringStream &name) const {
|
||||
int retval = __llvm_libc::syscall_impl(SYS_prctl, PR_GET_NAME, name_buffer);
|
||||
if (retval < 0)
|
||||
return -retval;
|
||||
name << name_buffer;
|
||||
name << name_buffer << cpp::StringStream::ENDS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user