aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/bus.c
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2014-08-25 09:46:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-24 01:59:10 -0400
commitcfda2794b5afe7ce64ee9605c64bef0e56a48125 (patch)
tree6585c76203157fe7309a3939af94059d0b625cb0 /drivers/misc/mei/bus.c
parent154eb18fedd5219516887a7e2bf2825b1b06ff2b (diff)
mei: bus: fix possible boundaries violation
function 'strncpy' will fill whole buffer 'id.name' of fixed size (32) with string value and will not leave place for NULL-terminator. Possible buffer boundaries violation in following string operations. Replace strncpy with strlcpy. Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/bus.c')
-rw-r--r--drivers/misc/mei/bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 09dad2df7aae..1cf3a72f2954 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -70,7 +70,7 @@ static int mei_cl_device_probe(struct device *dev)
70 70
71 dev_dbg(dev, "Device probe\n"); 71 dev_dbg(dev, "Device probe\n");
72 72
73 strncpy(id.name, dev_name(dev), sizeof(id.name)); 73 strlcpy(id.name, dev_name(dev), sizeof(id.name));
74 74
75 return driver->probe(device, &id); 75 return driver->probe(device, &id);
76} 76}