mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-23 12:56:08 +00:00
Fixed an issue whereby if an attribute structure was passed into a CMSIS RTOS v2 'new' function with an invalid address i.e. NULL assigned to the name (char*) member the memcpy at the end of each new function would cause a segmentation fault i.e. read from an invalid address. This has been fixed by checking if the name is NULL and using the default name from the init struct if it is. This is the same name that would be used if not passing in the optional attr function argument. Changed the memcpy to strncpy to ensure that the copy does not read beyond the end of the source string and changed the length from 16 to 15 (by means of a `sizeof(...)-1`) of the destination buffer to ensure that it will always be nul-terminated. Signed-off-by: Carlos Stuart <carlosstuart1970@gmail.com> |
||
---|---|---|
.. | ||
cmsis_rtos_v1 | ||
cmsis_rtos_v2 | ||
gui | ||
libc | ||
os | ||
posix | ||
CMakeLists.txt | ||
Kconfig |