Commit d77ea986 authored by Youness Alaoui's avatar Youness Alaoui

do not call memcpy if there is no copying to be done.. avoid a warning with coverity

parent da15cf44
......@@ -199,9 +199,11 @@ socket_recv (NiceSocket *sock, NiceAddress *from, guint len, gchar *buf)
msg[len++] = 0x01; /* auth version */
msg[len++] = ulen; /* username length */
if (ulen > 0)
memcpy (msg + len, priv->username, ulen); /* Username */
len += ulen;
msg[len++] = plen; /* Password length */
if (plen > 0)
memcpy (msg + len, priv->password, plen); /* Password */
len += plen;
......
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