[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20131216094626.GC13831@elgon.mountain>
Date: Mon, 16 Dec 2013 12:46:26 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Karsten Keil <isdn@...ux-pingi.de>
Cc: netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch] 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 <dan.carpenter@...cle.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));
}
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists