* [patch] isdn: use strlcpy() instead strcpy()
@ 2013-12-16 9:46 Dan Carpenter
2013-12-16 13:43 ` Eric Dumazet
2013-12-18 22:54 ` [patch v2] " David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2013-12-16 9:46 UTC (permalink / raw)
To: Karsten Keil; +Cc: netdev, kernel-janitors
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 <dan.carpenter@oracle.com>
diff --git a/drivers/isdn/sc/event.c b/drivers/isdn/sc/event.c
index 717003a3bdf4..833d96c2cf92 100644
--- a/drivers/isdn/sc/event.c
+++ b/drivers/isdn/sc/event.c
@@ -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));
}
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] isdn: use strlcpy() instead strcpy()
2013-12-16 9:46 [patch] isdn: use strlcpy() instead strcpy() Dan Carpenter
@ 2013-12-16 13:43 ` Eric Dumazet
2013-12-18 22:54 ` [patch v2] " David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2013-12-16 13:43 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Karsten Keil, netdev, kernel-janitors
On Mon, 2013-12-16 at 12:46 +0300, Dan Carpenter wrote:
> 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.
>
strcpy() is safer ?
-ENOPARSE ...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch v2] isdn: use strlcpy() instead strcpy()
2013-12-16 9:46 [patch] isdn: use strlcpy() instead strcpy() Dan Carpenter
2013-12-16 13:43 ` Eric Dumazet
@ 2013-12-18 22:54 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2013-12-18 22:54 UTC (permalink / raw)
To: dan.carpenter; +Cc: isdn, netdev, kernel-janitors, eric.dumazet
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 16 Dec 2013 16:56:23 +0300
> I don't think the in-kernel drivers ever hit this strcpy() so this
> doesn't change how the code works. But strlcpy() is safer.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied to net-next, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-18 22:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-16 9:46 [patch] isdn: use strlcpy() instead strcpy() Dan Carpenter
2013-12-16 13:43 ` Eric Dumazet
2013-12-18 22:54 ` [patch v2] " David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).