Did I miss something? What is the reason then? Petr
On 16/05/17 21:54, Richard Cochran wrote: > On Tue, May 16, 2017 at 04:56:48PM +0200, Petr Kulhavy wrote: >> This is not a fix of an actual issue rather than prevention of a potential >> issue. > No, your patch introduces an issue that wasn't there before. > >> @@ -1589,7 +1589,7 @@ int clock_switch_phc(struct clock *c, int phc_index) >> clockid_t clkid; >> char phc[32]; >> >> - snprintf(phc, 31, "/dev/ptp%d", phc_index); >> + snprintf(phc, sizeof(phc), "/dev/ptp%d", phc_index); > You replaced length 31 with 32. The code uses 31 for a reason. > > > Thanks, but no 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