Skip to content
Commit 937f9f23 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

strncpy will not copy the terminating \0 into the destination if the source is...

strncpy will not copy the terminating \0 into the destination if the source is larger than the size of the destination. Ensure that the last byte is always zero and let strncpy only copy CONFIG_TASK_NAME_SIZE bytes. The issue of unterminated names can be observed in ps when creating a pthread while CONFIG_TASK_NAME_SIZE is set to 8.
parent 8e4f7230
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment