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

remoteproc/rpmsg: Wrong argument to safe_strcpy() #625

Closed jonny-svaerd-arm closed 3 weeks ago

jonny-svaerd-arm commented 1 month ago

In commit c3132d0 and 27bec14 the strncpy function is replaced by a new safe_strcpy function, however the last argument to some of the calls are made with sizeof(name) where name is a const char * (resulting in pointer size).

I'm guessing these most likely were intended to be strlen(name)?

Thanks!

arnopo commented 1 month ago

Good catch! what i cannot understand is why the CI does not detect it... i will investigate and send a fix

arnopo commented 4 weeks ago

@jonny-svaerd-arm: Please, could you have a look to the https://github.com/OpenAMP/open-amp/pull/626 fix?

jonny-svaerd-arm commented 4 weeks ago

Looks good to me @arnopo. Thanks for fixing it so quickly, much appreciated.

arnopo commented 4 weeks ago

Looks good to me @arnopo. Thanks for fixing it so quickly, much appreciated.

Thank you for reporting the issue! t was good timing as we are starting tests for the upcoming release.