On Thu, Aug 28, 2014 at 06:43:02AM +0800, Chen Gang wrote:
> 'max_len' is the maximized length of 'name', so for writing '\0' to
> "name[max_len]", it is out of string's border, need use "max_len - 1"
> instead of.

Depends on how the function's API is defined.
And, at least in GCC sources that function seems to be completely unused,
nothing calls it, so it is hard to guess what the API should be.

> 2014-08-27  Chen Gang  <gang.chen.5...@gmail.com>
> 
>       * sanitizer_common/sanitizer_linux_libcdep.cc
>       (SanitizerGetThreadName): Avoid writing '\0' out of string's
>       border

        Jakub

Reply via email to