mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
linux: thread name wrongly truncated by one byte
The terminating NUL char was not considerd in the calculation of the space needed for storing the string. Fixes #790.
This commit is contained in:
parent
29b8370f73
commit
dad3f32d0b
@ -77,7 +77,7 @@ Platform_thread::Registry *Platform_thread::_registry()
|
||||
Platform_thread::Platform_thread(const char *name, unsigned, addr_t)
|
||||
: _tid(-1), _pid(-1)
|
||||
{
|
||||
strncpy(_name, name, min(sizeof(_name), strlen(name)));
|
||||
strncpy(_name, name, min(sizeof(_name), strlen(name) + 1));
|
||||
|
||||
_registry()->insert(this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user