]> 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:49:32 +0000 (15:49 +0000)
committerScott Griepentrog <sgriepentrog@digium.com>
Fri, 14 Nov 2014 15:49:32 +0000 (15:49 +0000)
commit026e3be151bc5da199322746498aaff5d16e4ca0
tree15aae35358622e829dca3cef069c7ff98040555e
parent9aaaf4c04ba7dd6962cd82674bf744758ae05204
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/branches/12@427875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/stun.c