mirror of
https://github.com/OpenAMP/open-amp.git
synced 2026-02-06 19:33:24 +08:00
The strlcpy() function has only recently become available in glibc. While this function prevents destination buffer overflow, it seems that it cannot guarantee read access only within the source buffer. this is for instance the case if the source string is not terminated by a'\0' character. Implement a safe_strcpy to ensure that no access is done out of the source and destination buffer ranges. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>