]> git.ipfire.org Git - thirdparty/asterisk.git/commit
stun: correct attribute string padding to match rfc
authorMatthew Jordan <mjordan@digium.com>
Fri, 19 Dec 2014 19:58:50 +0000 (19:58 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 19 Dec 2014 19:58:50 +0000 (19:58 +0000)
commitc00dc51636b1fedead1c570aef76b32db6208f44
treed1da2b984843dca2c8f98ecca8ffe118bb83af9f
parent61d40b749d9a7e2f531fcd9fad6c95d9f5132727
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/
........

Merged revisions 427874 from http://svn.asterisk.org/svn/asterisk/branches/11

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