unifikey: fix kasan bug reported in name_store [1/1]
authorJiamin Ma <jiamin.ma@amlogic.com>
Fri, 19 Apr 2019 00:15:47 +0000 (08:15 +0800)
committerNick Xie <nick@khadas.com>
Mon, 5 Aug 2019 06:31:34 +0000 (14:31 +0800)
commit36aca84a713d6f26aada82314e0da0bbbe5b8667
tree27e9b0f77b4f66b4b2969853b7682e6d277e33d5
parentb0af63af86421c23b712f1b988d6b525dc67c2b7
unifikey: fix kasan bug reported in name_store [1/1]

PD#SWPL-7326

Problem:
slab-out-of-bounds in strlen called by name_store

Solution:
Make sure the string passed to strlen is always '\0'
ended

Verify:
Locally

Change-Id: Ifd78a100c0e34ff9afb527ebe7b044ceb5c3505e
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
drivers/amlogic/unifykey/unifykey.c