diff options
author | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2008-11-12 19:47:49 -0500 |
---|---|---|
committer | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2008-11-12 19:47:49 -0500 |
commit | 6bfe898529e0dba0d962dcf63a91b201378eefe6 (patch) | |
tree | 887f744f8e03484d56bb5146ee0eae79d12cacee /stun/stunagent.c | |
parent | 9538675d4ef90161a436fc2f816cec86e8e3c2b6 (diff) | |
download | libnice-6bfe898529e0dba0d962dcf63a91b201378eefe6.tar.gz |
use memmove instead of memcpy to avoid overlaps
Diffstat (limited to 'stun/stunagent.c')
-rw-r--r-- | stun/stunagent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stun/stunagent.c b/stun/stunagent.c index 2a2626d..cc80d6f 100644 --- a/stun/stunagent.c +++ b/stun/stunagent.c @@ -366,7 +366,7 @@ bool stun_agent_init_response (StunAgent *agent, StunMessage *msg, msg->agent = agent; msg->key = request->key; msg->key_len = request->key_len; - memcpy (msg->long_term_key, request->long_term_key, + memmove (msg->long_term_key, request->long_term_key, sizeof(msg->long_term_key)); msg->long_term_valid = request->long_term_valid; @@ -400,7 +400,7 @@ bool stun_agent_init_error (StunAgent *agent, StunMessage *msg, msg->agent = agent; msg->key = request->key; msg->key_len = request->key_len; - memcpy (msg->long_term_key, request->long_term_key, + memmove (msg->long_term_key, request->long_term_key, sizeof(msg->long_term_key)); msg->long_term_valid = request->long_term_valid; |