> -----Original Message-----
> From: Richard Cochran [mailto:richardcoch...@gmail.com]
> Sent: Tuesday, May 16, 2017 1:19 PM
> To: Petr Kulhavy <br...@jikos.cz>
> Cc: linuxptp-devel@lists.sourceforge.net
> Subject: Re: [Linuxptp-devel] [PATCH] clock: fix possible buffer overrun
> 
> 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

in GCC7, snprintf would now complain about possible truncation if you used size 
31.

Thanks,
Jake

> 
> ------------------------------------------------------------------------------
> 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
------------------------------------------------------------------------------
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