]> git.proxmox.com Git - mirror_iproute2.git/commit
misc: fix compiler warning in ifstat and nstat
authorStephen Hemminger <stephen@networkplumber.org>
Sun, 29 Nov 2020 17:43:48 +0000 (09:43 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 30 Nov 2020 00:20:31 +0000 (16:20 -0800)
commitc014983921389dc7880dfe368eb43cb2570f6a4b
treec5f795bd347540879450d0ab4d2b11893c12e795
parent2319db905295fa47c651b52ae09a8d7bf305c6f7
misc: fix compiler warning in ifstat and nstat

The code here was doing strncpy() in a way that causes gcc 10
warning about possible string overflow. Just use strlcpy() which
will null terminate and bound the string as expected.

This has existed since start of git era so no Fixes tag.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
misc/ifstat.c
misc/nstat.c