提交 905703c9 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-10394: [freeswitch-core] FS Crash while linphone sends ICE packets

上级 c7250805
......@@ -216,7 +216,7 @@ SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t *buf, ui
alen = switch_stun_attribute_padded_length(attr);
if (alen > (int)bytes_left || alen <= 0) {
if (alen > (int)bytes_left || alen < 0) {
/*
* Note we simply don't "break" here out of the loop anymore because
* we don't want the upper layers to have to deal with attributes without a value
......@@ -330,6 +330,9 @@ SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t *buf, ui
}
bytes_left -= alen; /* attribute value consumed, substract padded length */
if (alen == 0) break;
xlen += 4 + alen;
attr = (switch_stun_packet_attribute_t *) (attr->value + alen);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论