dummynet: Use strlcpy to appease static checkers
authorcem <cem@FreeBSD.org>
Thu, 13 Apr 2017 17:47:44 +0000 (17:47 +0000)
committercem <cem@FreeBSD.org>
Thu, 13 Apr 2017 17:47:44 +0000 (17:47 +0000)
commitabb96db126559e1eeed0df6c9c27f4a86487c255
tree667fb6fe4ae7bd9fa9ef4cfe895f51ee31af8b27
parentd63e123e1aa4af79960e09644c5c4438787eead1
dummynet: Use strlcpy to appease static checkers

Some dummynet modules used strcpy() to copy from a larger buffer
(dn_aqm->name) to a smaller buffer (dn_extra_parms->name).  It happens that
the lengths of the strings in the dn_aqm buffers were always hardcoded to be
smaller than the dn_extra_parms buffer ("CODEL", "PIE").

Use strlcpy() instead, to appease static checkers.  No functional change.

Reported by: Coverity
CIDs: 1356163, 1356165
Sponsored by: Dell EMC Isilon
sys/netpfil/ipfw/dn_aqm_codel.c
sys/netpfil/ipfw/dn_aqm_pie.c