Fix buffer overflow in launcher ta_process_loop()
Fix buffer overflow in launcher ta_process_loop()

The proc_name variable is limited to 16 bytes (MAX_PR_NAME), which is
the maximum size for the thread name allowed by PR_SET_NAME prctl(2)
option. Note that the proc_name passed to prctl(PR_SET_NAME) need be
null-terminated only if it contains fewer bytes than sixteen. Hence this
patch also changes ctl_params->argv0 to be initialized from
open_msg->ta_so_name to avoid non-terminated strings in the argument
list.

Change-Id: I3a6a634b2dda16bbdd971af77f56abaabe195e4c
Signed-off-by: Thomas Nyman <637edc83cb495d74e75d0415e2e205da088dba42@aalto.fi>

Open-TEE/tee-engine