mei: bus: fix possible boundaries violation
authorAlexander Usyskin <alexander.usyskin@intel.com>
Mon, 25 Aug 2014 13:46:53 +0000 (16:46 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Sep 2014 05:59:10 +0000 (22:59 -0700)
commitcfda2794b5afe7ce64ee9605c64bef0e56a48125
tree6585c76203157fe7309a3939af94059d0b625cb0
parent154eb18fedd5219516887a7e2bf2825b1b06ff2b
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>
drivers/misc/mei/bus.c