summaryrefslogtreecommitdiff
path: root/stun
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2014-04-24 21:32:40 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2014-04-24 21:34:50 -0400
commiteb9d67d7d801b2e7108fde7da822cffb906f95cf (patch)
tree9b63fbc58a784766f342d12cf6736a1cef7e4c2f /stun
parentd09eb198a818f4c8f2285511cf31723534ee161a (diff)
downloadlibnice-eb9d67d7d801b2e7108fde7da822cffb906f95cf.tar.gz
stunagent: Only declare the long term key valid if the username/realm coudl be read
Diffstat (limited to 'stun')
-rw-r--r--stun/stunagent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stun/stunagent.c b/stun/stunagent.c
index 40e4d15..72cc231 100644
--- a/stun/stunagent.c
+++ b/stun/stunagent.c
@@ -554,9 +554,9 @@ size_t stun_agent_finish_message (StunAgent *agent, StunMessage *msg,
stun_hash_creds (realm, realm_len,
username, username_len,
key, key_len, md5);
+ memcpy (msg->long_term_key, md5, sizeof(msg->long_term_key));
+ msg->long_term_valid = TRUE;
}
- memcpy (msg->long_term_key, md5, sizeof(msg->long_term_key));
- msg->long_term_valid = TRUE;
}
/* If no realm/username and long term credentials,