Fix segfault in sofia's stun code

This commit is contained in:
Mathieu Rene 2011-07-27 12:26:30 -04:00
parent 492bc6b416
commit 7403db7005
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ int stun_parse_message(stun_msg_t *msg)
msg->stun_attr = NULL;
while (len > 0) {
i = stun_parse_attribute(msg, p);
if (i <= 0) {
if (i <= 0 || i > len) {
SU_DEBUG_3(("%s: Error parsing attribute.\n", __func__));
return -1;
}