[Home]

Summary:ASTERISK-28421: Wrong type used for timestamp in res_rtp_asterisk
Reporter:Morten Tryfoss (mtryfoss)Labels:
Date Opened:2019-05-21 09:05:15Date Closed:2019-05-23 09:05:54
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_rtp_asterisk
Versions:16.3.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:int is used instead of unsigned int in ast_rtp_interpret. Values above max of an int causes (at least) the adaptive jitterbuffer to stop working because of negative timestamp value in the packet.

Suggested fix:

--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -6326,7 +6326,8 @@ static struct ast_frame *ast_rtp_interpret(struct ast_rtp_instance *instance, st
       unsigned int *rtpheader = (unsigned int*)(read_area);
       struct ast_rtp *rtp = ast_rtp_instance_get_data(instance);
       struct ast_rtp_instance *instance1;
-       int res = length, hdrlen = 12, seqno, timestamp, payloadtype, padding, mark, ext, cc;
+       int res = length, hdrlen = 12, seqno, payloadtype, padding, mark, ext, cc;
+       unsigned int timestamp;
       RAII_VAR(struct ast_rtp_payload_type *, payload, NULL, ao2_cleanup);
       struct frame_list frames;

Comments:By: Asterisk Team (asteriskteam) 2019-05-21 09:05:16.844-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Benjamin Keith Ford (bford) 2019-05-21 09:16:53.831-0500

Would you like to put this up on Gerrit [1]? If you haven't done so before, you can find information on how to here [2].

[1]: https://gerrit.asterisk.org/q/status:open
[2]: https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

By: Morten Tryfoss (mtryfoss) 2019-05-21 11:36:42.450-0500

Hope this is ok:

https://gerrit.asterisk.org/c/asterisk/+/11397

By: Benjamin Keith Ford (bford) 2019-05-21 11:39:18.575-0500

Yup, that's perfect! I'll assign this issue to you and it will automatically be closed once the review goes through and the change is officially merged and released.

By: Friendly Automation (friendly-automation) 2019-05-23 09:05:55.323-0500

Change 11397 merged by Friendly Automation:
res_rtp_asterisk: timestamp should be unsigned instead of signed int

[https://gerrit.asterisk.org/c/asterisk/+/11397|https://gerrit.asterisk.org/c/asterisk/+/11397]

By: Friendly Automation (friendly-automation) 2019-05-23 09:08:22.933-0500

Change 11400 merged by Friendly Automation:
res_rtp_asterisk: timestamp should be unsigned instead of signed int

[https://gerrit.asterisk.org/c/asterisk/+/11400|https://gerrit.asterisk.org/c/asterisk/+/11400]