Be sure to do ntohl before considering extended field
authorMark Spencer <markster@digium.com>
Tue, 31 Aug 2004 14:03:18 +0000 (14:03 +0000)
committerMark Spencer <markster@digium.com>
Tue, 31 Aug 2004 14:03:18 +0000 (14:03 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3691 65c4cc65-6c06-0410-ace0-fbb531ad65f3

rtp.c

diff --git a/rtp.c b/rtp.c
index 4468068..07c022e 100755 (executable)
--- a/rtp.c
+++ b/rtp.c
@@ -449,7 +449,7 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
        if (ext) {
                /* RTP Extension present */
                hdrlen += 4;
-               hdrlen += (rtpheader[3] & 0xffff) << 2;
+               hdrlen += (ntohl(rtpheader[3]) & 0xffff) << 2;
        }
 
        if (res < hdrlen) {