mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
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>
This commit is contained in:
parent
154eb18fed
commit
cfda2794b5
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ static int mei_cl_device_probe(struct device *dev)
|
|||
|
||||
dev_dbg(dev, "Device probe\n");
|
||||
|
||||
strncpy(id.name, dev_name(dev), sizeof(id.name));
|
||||
strlcpy(id.name, dev_name(dev), sizeof(id.name));
|
||||
|
||||
return driver->probe(device, &id);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue