]> git.ipfire.org Git - thirdparty/asterisk.git/commit
stun: correct attribute string padding to match rfc
authorScott Griepentrog <sgriepentrog@digium.com>
Fri, 14 Nov 2014 15:46:30 +0000 (15:46 +0000)
committerScott Griepentrog <sgriepentrog@digium.com>
Fri, 14 Nov 2014 15:46:30 +0000 (15:46 +0000)
commitd0495f4139f36079b2d3d6745f94f45646d2d36a
treefd1e67f24a5da08fa9caa303952256d541fedac0
parent093db340b1c053a842908134ebbc8a514de33825
stun: correct attribute string padding to match rfc

When sending the USERNAME attribute in an RTP STUN
response, the implementation in append_attr_string
passed the actual length, instead of padding it up
to a multiple of four bytes as required by the RFC
3489.  This change adds separate variables for the
string and padded attributed lengths, and performs
padding correctly.

Reported by: Thomas Arimont
Review: https://reviewboard.asterisk.org/r/4139/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@427874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/stun.c