[Asterisk-code-review] res_rtp_asterisk: Addressing possible rtp range issues (asterisk[16])

Sean Bright asteriskteam at digium.com
Wed Nov 17 10:02:48 CST 2021


Attention is currently required from: Michael Bradeen, Joshua Colp, Kevin Harwell.
Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16637 )

Change subject: res_rtp_asterisk: Addressing possible rtp range issues
......................................................................


Patch Set 3: Code-Review-1

(1 comment)

File res/res_rtp_asterisk.c:

https://gerrit.asterisk.org/c/asterisk/+/16637/comment/c33da0c2_3ba51967 
PS3, Line 3864: x = (rtpend == rtpstart) ? rtpstart : (ast_random() % (rtpend - rtpstart)) + rtpstart;
We know that rtpend has to be greater than rtpstart so this can be simplified into just the false branch of the ternary:

 x = ast_random() % (rtpend - rtpstart) + rtpstart;



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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I90f07deef0716da4a30206e9f849458b2dbe346b
Gerrit-Change-Number: 16637
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Wed, 17 Nov 2021 16:02:48 +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/20211117/c4244b0a/attachment.html>


More information about the asterisk-code-review mailing list