From: Dragos Oancea Date: Fri, 7 Sep 2018 14:59:17 +0000 (+0100) Subject: FS-11384: stun: fix for when parsing incoming packets that contain attributes with... X-Git-Tag: v1.8.6~1^2~129^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=164b41d8bd6526da69c99f9bb22ddc1f1f33729b;p=thirdparty%2Ffreeswitch.git FS-11384: stun: fix for when parsing incoming packets that contain attributes with no value (like USE_CANDIDATE) --- diff --git a/src/switch_stun.c b/src/switch_stun.c index 6573d3eceb..a797ebfefe 100644 --- a/src/switch_stun.c +++ b/src/switch_stun.c @@ -331,8 +331,6 @@ 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);