mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-10 03:11:45 +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)
|
Platform_thread::Platform_thread(const char *name, unsigned, addr_t)
|
||||||
: _tid(-1), _pid(-1)
|
: _tid(-1), _pid(-1)
|
||||||
{
|
{
|
||||||
strncpy(_name, name, min(sizeof(_name), strlen(name)));
|
strncpy(_name, name, min(sizeof(_name), strlen(name) + 1));
|
||||||
|
|
||||||
_registry()->insert(this);
|
_registry()->insert(this);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user