Commit 0f798e75 authored by Dafydd Harries's avatar Dafydd Harries

don't assume that StunMessage->attributes is not NULL

darcs-hash:20070201124922-c9803-f957e0dc8d4e479d5dbf2270ac851213fe9e8927.gz
parent e0b4af8e
...@@ -435,12 +435,13 @@ _handle_stun ( ...@@ -435,12 +435,13 @@ _handle_stun (
* --> send error * --> send error
*/ */
for (attr = msg->attributes; *attr; attr++) if (msg->attributes)
if ((*attr)->type == STUN_ATTRIBUTE_USERNAME) for (attr = msg->attributes; *attr; attr++)
{ if ((*attr)->type == STUN_ATTRIBUTE_USERNAME)
username = (*attr)->username; {
break; username = (*attr)->username;
} break;
}
if (username == NULL) if (username == NULL)
/* no username attribute found */ /* no username attribute found */
......
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