[Asterisk-code-review] res_http_websocket: Add trailing zero for text strings (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Fri Jul 10 08:25:56 CDT 2020


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/14626 )

Change subject: res_http_websocket: Add trailing zero for text strings
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

The code change is fine.  Need a better commit message description to actually describe the problem and fix.

https://gerrit.asterisk.org/c/asterisk/+/14626/2//COMMIT_MSG 
Commit Message:

https://gerrit.asterisk.org/c/asterisk/+/14626/2//COMMIT_MSG@9 
PS2, Line 9: Per RFC example https://tools.ietf.org/html/rfc6455#section-5.7 text
We were actually doing what this description says.

The real problem was that we read beyond the end of the buffer when copying the string out of the buffer when we used ast_copy_string() because the original string was not null terminated.  The original reporter said valgrind pointed out the problem.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14626
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ib4a75cffeb1eb8cf01136ef30306bd623e531a2a
Gerrit-Change-Number: 14626
Gerrit-PatchSet: 2
Gerrit-Owner: Nickolay V. Shmyrev <nshmyrev at alphacephei.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Fri, 10 Jul 2020 13:25:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200710/70e61d93/attachment.html>


More information about the asterisk-code-review mailing list