Ice4j stun/turn attributes length bug


#1

Hi,

So, STUN RFC-5389 specifies STUN attributes length field should contain the length of the value field prior to any padding.
So for example EVEN-PORT attribute value length is 1 byte, but EvenPortAttribute.decodeAttributeBody() expects length == 4 bytes. It is expecting the length of the padded value.

On RequestedAddressFamilyAttribute.decodeAttributeBody() there is also a bug, but not exactly the same scenario. The value field is 4 bytes long (1 byte + 3 reserved bytes) according to RFC-6156 but the code expects 1-byte long value.

Please correct me if I am wrong.

Thanks,
Paulo