- interaction->len = str_len (resp) + 1;
- interaction->result = mem_malloc (interaction->len);
- memcpy ((char*) interaction->result, resp, interaction->len);
-
+ interaction->len = m_strlen(resp) + 1;
+ interaction->result = p_dupstr(resp, interaction->len - 1);