Re: [PATCH v2] staging: fieldbus: Use %pM format specifier for MAC addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 28, 2020 at 07:39:58PM -0400, Sven Van Asbroeck wrote:
> On Tue, Oct 27, 2020 at 2:34 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> >
> > +       return snprintf(buf, max_size, "%pM\n", response.addr);
> 
> Judging from a few Outreachy patches that have hit my inbox, snprintf() is
> considered unsafe in a sysfs_get callback. It should be replaced by
> scnprintf() or even better, sysfs_emit(), which was recently introduced
> to address sprintf-variant issues in sysfs callbacks.

It's already applied, I think you can send a follow up for above,
which is good point, but not the scope of the patch (although
they might have been unified together).

-- 
With Best Regards,
Andy Shevchenko


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux