Skip to content

Commit 17e7168

Browse files
committed
nat46-netdev: Do not use strcpy
[Coverity] Calling risky function (DC.CUSTOM_STRCPY)
1 parent 04923c5 commit 17e7168

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nat46/modules/nat46-netdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static int nat46_netdev_create(struct net *net, char *basename, struct net_devic
149149
snprintf(devname, strlen(NETDEV_DEFAULT_NAME)+3, "%s%d", NETDEV_DEFAULT_NAME, netdev_count);
150150
netdev_count++;
151151
} else {
152-
strcpy(devname, basename);
152+
snprintf(devname, strlen(basename)+1, "%s", basename);
153153
}
154154

155155
#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,17,0)

0 commit comments

Comments
 (0)