OpenAMP / open-amp

The main OpenAMP library implementing RPMSG, Virtio, and Remoteproc for RTOS etc
https://www.openampproject.org/
Other
721 stars 291 forks source link

lib: fix usage of strncpy #618

Closed tomi-font closed 1 month ago

tomi-font commented 1 month ago

Make sure that the copied-to buffer is null-terminated. This fixes the stringop-truncation compilation error.

arnopo commented 1 month ago

This PR duplicates https://github.com/OpenAMP/open-amp/pull/602. We have spoken about the creation of a specific function. Feel free to implement it; otherwise, I plan to do it for the coming release.

tomi-font commented 1 month ago

Alright. Please go ahead. Can you post a comment here (or ping me) when you put up a PR?