Commit db3cb4f0 authored by Youness Alaoui's avatar Youness Alaoui

Fix username copying if no username is available

parent 8842a1fd
......@@ -984,6 +984,7 @@ size_t priv_gen_username (NiceAgent *agent, guint component_id,
gsize remote_len = strlen (remote);
gsize local_len = strlen (local);
if (remote_len > 0 && local_len > 0) {
if (agent->compatibility == NICE_COMPATIBILITY_ID19 &&
dest_len >= remote_len + local_len + 1) {
memcpy (dest, remote, remote_len);
......@@ -1045,6 +1046,7 @@ size_t priv_gen_username (NiceAgent *agent, guint component_id,
g_free (local_decoded);
g_free (remote_decoded);
}
}
return len;
}
......
Markdown is supported
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