Commit 1585d259 authored by Youness Alaoui's avatar Youness Alaoui

turn: Do not access the response's attributes if there is no response

parent fae5482e
......@@ -1330,10 +1330,12 @@ priv_send_create_permission(TurnPriv *priv, StunMessage *resp,
uint8_t *nonce = NULL;
uint16_t nonce_len = 0;
realm = (uint8_t *) stun_message_find (resp,
STUN_ATTRIBUTE_REALM, &realm_len);
nonce = (uint8_t *) stun_message_find (resp,
STUN_ATTRIBUTE_NONCE, &nonce_len);
if (resp) {
realm = (uint8_t *) stun_message_find (resp,
STUN_ATTRIBUTE_REALM, &realm_len);
nonce = (uint8_t *) stun_message_find (resp,
STUN_ATTRIBUTE_NONCE, &nonce_len);
}
/* register this peer as being pening a permission (if not already pending) */
if (!priv_has_sent_permission_for_peer (priv, peer)) {
......
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