On Wed, Apr 03, 2019 at 08:47:58AM -0700, Stephen Hemminger wrote: > On Wed, 3 Apr 2019 15:45:01 +0100 > Bruce Richardson <bruce.richard...@intel.com> wrote: > > > > > static void > > -arp_op_name(uint16_t arp_op, char *buf) > > +arp_op_name(uint16_t arp_op, char *buf, size_t buf_len) > > { > > switch (arp_op) { > > case ARP_OP_REQUEST: > > - snprintf(buf, sizeof("ARP Request"), "%s", "ARP Request"); > > + snprintf(buf, buf_len, "%s", "ARP Request"); > > return; > This should be strlcpy not snprintf
Yes, it should, but I just let that get fixed by cocci script in the later patch. For this one, I just fixed the most egregious error.