isdn: use strlcpy() instead strcpy()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 16 Dec 2013 13:56:23 +0000 (16:56 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Dec 2013 22:53:59 +0000 (17:53 -0500)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/sc/event.c

index 717003a3bdf4957835f43eab78eff4f8abc62f5e..833d96c2cf92578a96efc72e18205d63101d9f03 100644 (file)
@@ -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));
                }
        }