[Nice] [nice/master] use memmove instead of memcpy to avoid overlaps
Youness Alaoui
youness.alaoui at collabora.co.uk
Wed Nov 12 16:47:49 PST 2008
---
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;
--
1.5.6.5
More information about the Nice
mailing list