LF-1850 fastboot: Fix buffer not null terminated
authorJi Luo <ji.luo@nxp.com>
Mon, 3 Aug 2020 10:31:36 +0000 (18:31 +0800)
committerJi Luo <ji.luo@nxp.com>
Wed, 19 May 2021 12:00:33 +0000 (20:00 +0800)
commit30fdd8c11f2580322465c8ef7125a1398b7eaac4
tree1cef55619df3e81017c1b814600efaf8e8ef9a26
parent4fd9870d55faadec1f19e29b6b620225bb821418
LF-1850 fastboot: Fix buffer not null terminated

Fix Coverity Issue 3351934. Calling strncpy() with the size shorter
than the source string and would cause null-terminate dest buffer.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: I1e71fb584eb8f10a90ec87564cc49b7f9388c3de
(cherry picked from commit 0c408158af2592f34ed4ecc7c6a30db5c8676ffe)
drivers/fastboot/fb_fsl/fastboot_lock_unlock.c