[asterisk-bugs] [JIRA] (ASTERISK-28421) Wrong type used for timestamp in res_rtp_asterisk

Friendly Automation (JIRA) noreply at issues.asterisk.org
Thu May 23 09:09:47 CDT 2019


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=247227#comment-247227 ] 

Friendly Automation commented on ASTERISK-28421:
------------------------------------------------

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]

> Wrong type used for timestamp in res_rtp_asterisk
> -------------------------------------------------
>
>                 Key: ASTERISK-28421
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28421
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_rtp_asterisk
>    Affects Versions: 16.3.0
>            Reporter: Morten Tryfoss
>            Assignee: Morten Tryfoss
>            Severity: Minor
>
> 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;
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list