That's what I mean. The size in snprintf() includes the terminating 0. 
That's why I replaced it with sizeof.
And that's why I wrote in the commit message that there is no actual 
issue, rather than a potential.
... when someone changes the size of the buffer downwards.

Cheers
Petr

On 16/05/17 22:18, Richard Cochran wrote:
> On Tue, May 16, 2017 at 09:58:19PM +0200, Petr Kulhavy wrote:
>> Did I miss something? What is the reason then?
> Never mind, this is snprintf() and not strncpy().
>
> The original code was confused and misleading using 31 (but not really
> incorrect either).
>
> Thanks,
> Richard


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to