mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
net: ethernet: neterion: vxge: vxge-main.c: Cleaning up missing null-terminate in conjunction with strncpy
Replacing strncpy with strlcpy to avoid strings that lacks null terminate. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
949bdd2083
commit
13bb5180e8
@ -3537,7 +3537,7 @@ static void vxge_device_unregister(struct __vxge_hw_device *hldev)
|
||||
vxge_debug_entryexit(vdev->level_trace, "%s: %s:%d", vdev->ndev->name,
|
||||
__func__, __LINE__);
|
||||
|
||||
strncpy(buf, dev->name, IFNAMSIZ);
|
||||
strlcpy(buf, dev->name, IFNAMSIZ);
|
||||
|
||||
flush_work(&vdev->reset_task);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user