isdn: use strlcpy() instead strcpy()
Subsystems (3)
PATCH 1/1 isdn: use strlcpy() instead strcpy()
I don't think the in-kernel drivers ever hit this strcpy() so this doesn't change how the code works. But strcpy() is safer.
Signed-off-by Dan Carpenter <[email protected]>
drivers/isdn/sc/event.c +1 -1
@@ -57,7 +57,7 @@ int indicate_status(int card, int event, ulong Channel, char *Data)memcpy (&cmd.parm.setup, Data,sizeof (cmd.parm.setup));break ;default : -strcpy (cmd.parm.num, Data); +strlcpy (cmd.parm.num, Data,sizeof (cmd.parm.num)); } }
Quoted 3 lines · Dan Carpenter
I don't think the in-kernel drivers ever hit this
strcpy()so this doesn't change how the code works. Butstrcpy()is safer.
strcpy() is safer ?
-ENOPARSE ...
From: Dan Carpenter <[email protected]>
Date: Mon, 16 Dec 2013 16:56:23 +0300
Quoted 4 lines
I don't think the in-kernel drivers ever hit this
strcpy()so this doesn't change how the code works. Butstrlcpy()is safer.Signed-off-by Dan Carpenter <[email protected]>
Applied to net-next, thanks.