framework/binary_manager_update : Fix non-terminated string copy
WID:10233611 Copying from parameter string 'binary_name' to '&data.bin_name[0]' at binary_manager_update.c:137 may form a non-terminated C string of size 16.
@@ -134,7 +134,8 @@ binmgr_result_type_e binary_manager_get_download_path(char *binary_name, uint32_
return BINMGR_INVALID_PARAM;
}
- strncpy(data.bin_name, binary_name, BIN_NAME_MAX);
+ strncpy(data.bin_name, binary_name, BIN_NAME_MAX - 1);
+ data.bin_name[BIN_NAME_MAX - 1] = '\0';
data.version = version;
ret = binary_manager_set_request(&request_msg, BINMGR_CREATE_BIN, &data);
