]> git.dujemihanovic.xyz Git - u-boot.git/commit
tpm: use memmove() for overlapping buffers
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 2 Nov 2024 10:27:37 +0000 (11:27 +0100)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Sat, 16 Nov 2024 17:21:59 +0000 (19:21 +0200)
commit6c717d952d455d2efc267496fa9797a656459e6f
tree6f5eccf11580102599e5107a715a3bf9717359f7
parentf39199e8096dab68fe4a8e15f8ff60026a5fe491
tpm: use memmove() for overlapping buffers

The behavior of memcpy() for overlapping buffers is undefined.

Fixes: 4c57ec76b725 ("tpm: Implement state command for Cr50")
Addresses-Coverity-ID: 356664 Overlapping buffer in memory copy
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/tpm-v2.c