net: ethernet: neterion: vxge: vxge-main.c: Cleaning up missing null-terminate in...
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Sun, 14 Sep 2014 17:34:47 +0000 (19:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Sep 2014 18:17:00 +0000 (14:17 -0400)
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>
drivers/net/ethernet/neterion/vxge/vxge-main.c

index 4f40d7b8629e3a103c34e081a616d8d900e9093d..cc0485e3c6210997c532fd4cee51946e93983104 100644 (file)
@@ -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);