Skip to content
Commit ca64b719 authored by Sudeep Holla's avatar Sudeep Holla
Browse files

firmware: arm_scmi: use strlcpy to ensure NULL-terminated strings



Replace all the memcpy() for copying name strings from the firmware with
strlcpy() to make sure we are bounded by the source buffer size and we
also always have NULL-terminated strings.

This is needed to avoid out of bounds accesses if the firmware returns
a non-terminated string.

Reported-by: default avatarOlof Johansson <olof@lixom.net>
Acked-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent 11da3a7f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment