[Asterisk-cvs] asterisk rtp.c,1.103,1.104
markster at lists.digium.com
markster at lists.digium.com
Tue Dec 28 11:50:09 CST 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv12918
Modified Files:
rtp.c
Log Message:
Ignore invalid RTP packets (bug #3030)
Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- rtp.c 28 Dec 2004 16:43:20 -0000 1.103
+++ rtp.c 28 Dec 2004 16:45:03 -0000 1.104
@@ -427,6 +427,7 @@
struct sockaddr_in sin;
int len;
unsigned int seqno;
+ int version;
int payloadtype;
int hdrlen = 12;
int mark;
@@ -477,6 +478,12 @@
/* Get fields */
seqno = ntohl(rtpheader[0]);
+
+ /* Check RTP version */
+ version = (seqno & 0xC0000000) >> 30;
+ if (version != 2)
+ return &null_frame;
+
payloadtype = (seqno & 0x7f0000) >> 16;
mark = seqno & (1 << 23);
ext = seqno & (1 << 28);
More information about the svn-commits
mailing list