[Asterisk-code-review] res_http_websocket: Add payload masking to the websocket client (asterisk[master])
Moises Silva
asteriskteam at digium.com
Mon Jun 15 15:32:48 CDT 2020
Moises Silva has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/14520 )
Change subject: res_http_websocket: Add payload masking to the websocket client
......................................................................
Patch Set 2:
(1 comment)
Thanks for the comments, it should be better now. Fun fact, I ran valgrind to try and see if I got some other buffer calculation wrong and found a bug in websocket_read_string, but, unrelated to this patch. I don't think we want to solve it here.
This ast_copy_string seems to be copying one byte more over the payload:
https://github.com/asterisk/asterisk/blob/master/res/res_http_websocket.c#L1439
https://gerrit.asterisk.org/c/asterisk/+/14520/1/res/res_http_websocket.c
File res/res_http_websocket.c:
https://gerrit.asterisk.org/c/asterisk/+/14520/1/res/res_http_websocket.c@287
PS1, Line 287: static void websocket_mask_payload(struct ast_websocket *session, char *frame, char *payload, uint64_t payload_size);
> I'd just move the function here instead of declaring it here and defining it below.
I can do that.
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14520
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Id465030f2b1997b83d408933fdbabe01827469ca
Gerrit-Change-Number: 14520
Gerrit-PatchSet: 2
Gerrit-Owner: Moises Silva <moises.silva at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-CC: George Joseph <gjoseph at digium.com>
Gerrit-CC: Joshua Colp <jcolp at sangoma.com>
Gerrit-CC: Nickolay V. Shmyrev <nshmyrev at alphacephei.com>
Gerrit-Comment-Date: Mon, 15 Jun 2020 20:32:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200615/a8ca4b23/attachment.html>
More information about the asterisk-code-review
mailing list